Splunk Search

Can you help to match events with an inputlookup search?

jip31
Motivator

Hi,

I use the basic query below in order to collect the model of a host (workstation)

index="xx" sourcetype="WMI:Model" | table host Model

In parallel, I have a CSV file called "cmdb" where there is a field called "HOSTNAME", which refers to the field "host" in my search

I want to match these 2 fields (host and HOSTNAME) in order to collect in a same table the host, the Model and other fields of my CSV file like CLIENT_USER COUNTRY STATUS ROOM SITE & TOWN

Could you help me please??

0 Karma
1 Solution

chrisyounger
SplunkTrust
SplunkTrust

Try this: index="xx" sourcetype="WMI:Model" |fields host Model | lookup cmdb HOSTNAME as host OUTPUTNEW | table *

View solution in original post

chrisyounger
SplunkTrust
SplunkTrust

Try this: index="xx" sourcetype="WMI:Model" |fields host Model | lookup cmdb HOSTNAME as host OUTPUTNEW | table *

avoelk
Communicator

I know this answer is pretty old but, does this kind of lookup match command work within tstats or how would I need to re arrange it? 

 

0 Karma

jip31
Motivator

perfect thanks

0 Karma
Get Updates on the Splunk Community!

Splunk APM: New Product Features + Community Office Hours Recap!

Howdy Splunk Community! Over the past few months, we’ve had a lot going on in the world of Splunk Application ...

Index This | Forward, I’m heavy; backward, I’m not. What am I?

April 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

A Guide To Cloud Migration Success

As enterprises’ rapid expansion to the cloud continues, IT leaders are continuously looking for ways to focus ...