Splunk Search

How to map the lookup conditions and get the indexed data in splunk

snehalk
Communicator

Hello Everyone,

I have requirement where i need to search eventtype which are present in my lookup table, say in lookup i have one column name called "eventtype" and other column "Status" value as pass or Fail

eg:

 eventtype  Status 
    xyz         pass 
   abc          Fail

So in my final result i want the all indexed data with eventtype "xyz"

Below is what i tried but its not working

index=myindex sourcetype=aa  [ | inputlookup myfile.csv where Status ="pass"| table eventtype ] 

Can any one help me on this?

Thanks,
Snehal Kinekar

0 Karma

woodcock
Esteemed Legend

In Splunk, eventtypes are a search-time-only construct so what you are asking (something index-time based on eventtypes) is utterly impossible. Perhaps I am being "too literal" and I might have a better/different answer if you rephrased your question.

0 Karma

martin_mueller
SplunkTrust
SplunkTrust

If you define your lookup to be automatic (Settings -> Lookups -> Automatic Lookups) for that sourcetype inputting eventtype and outputting Status, you will be able to search like this:

index=myindex sourcetype=aa Status=pass

http://docs.splunk.com/Documentation/Splunk/6.5.2/Knowledge/Usefieldlookupstoaddinformationtoyoureve...

0 Karma

martin_mueller
SplunkTrust
SplunkTrust

By default, an automatic lookup will produce up to 1000 matches.

Are you trying to tag eventtypes? If so, have you looked at assigning actual tags for those eventtypes?

0 Karma

snehalk
Communicator

Hello Martin,

When i done the automatic lookup, am not able to see Status field in indexed data.

0 Karma

snehalk
Communicator

Hello Martin,

Thanks for reply
For doing automatic lookup we need to have unique field values from both the set (index data and lookup data) but in my case each event is tag to multiple eventtype. so how to do this ? in automatic lookup?

0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.

Can’t make it to .conf25? Join us online!

Get Updates on the Splunk Community!

Can’t Make It to Boston? Stream .conf25 and Learn with Haya Husain

Boston may be buzzing this September with Splunk University and .conf25, but you don’t have to pack a bag to ...

Splunk Lantern’s Guide to The Most Popular .conf25 Sessions

Splunk Lantern is a Splunk customer success center that provides advice from Splunk experts on valuable data ...

Unlock What’s Next: The Splunk Cloud Platform at .conf25

In just a few days, Boston will be buzzing as the Splunk team and thousands of community members come together ...