Splunk Search

How can I create a lookup where if the user is not found, the result should be NULL?

dlcrooks
Explorer

When searching a lookup and the user is not found then I need the result to be NULL.

Any ideas?

0 Karma

martin_mueller
SplunkTrust
SplunkTrust

You can specify a default value in case there's no match in your lookup definition.

0 Karma

martin_mueller
SplunkTrust
SplunkTrust

The lookup command will use your settings from the lookup defintion:

  • in the lookup definition, set minimum matches to 1 or greater
  • in the lookup definition, set the default matches to whatever string you like
  • use ... | lookup your_lookup_definition your_input_field OUTPUT your_output_fields or whatever
0 Karma

dlcrooks
Explorer

How do I with the command?

0 Karma
Get Updates on the Splunk Community!

Introducing the Splunk Community Dashboard Challenge!

Welcome to Splunk Community Dashboard Challenge! This is your chance to showcase your skills in creating ...

Get the T-shirt to Prove You Survived Splunk University Bootcamp

As if Splunk University, in Las Vegas, in-person, with three days of bootcamps and labs weren’t enough, now ...

Wondering How to Build Resiliency in the Cloud?

IT leaders are choosing Splunk Cloud as an ideal cloud transformation platform to drive business resilience,  ...