Splunk Search

Lookups and non matching values

samhughe
Path Finder

One of our users has a lookup requirement that I'm struggling to find a workable solution. They want to have a number of fields automatically looked up, but need any non matching values to be returned 'as is' rather than a default generic value.

I've tried csv lookups and they look fine except the non matching values

I've tried scripted lookups and these can be used to return the non-matching values but introduce a new problem. They don't take effect at the right time so I have to have a " | search ...." after the initial search queries and so makes the usability of the lookups much less user friendly.

Any suggestions?

Tags (2)
0 Karma

samhughe
Path Finder

Best way I've found so far is to use eval and case based on sowings answer in http://splunk-base.splunk.com/answers/43893/case-defaulting-to-value-rather-than-null

0 Karma

lukejadamec
Super Champion

In Manager > Lookups > Lookup Definitions > your lookup

Have you tried Advanced Options with Min = 1, Max = 1, and Default (less than min) = As Is?

0 Karma

lukejadamec
Super Champion

I beg to differ. I just tested it.
If you comment out an common entry (line) from a lookup.csv (hence create a non-matching value) then As Is shows up in the results.
Are you sure you worded your question correctly?
You might want to verify that the value you are entering in the GUI is being sent to the right transforms.conf (perhaps you have a conflicting transforms.conf).

0 Karma

samhughe
Path Finder

Thanks for the suggestion but this just uses the default of NONE for all non matching values unfortunately

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 ...