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!

CX Day is Coming!

Customer Experience (CX) Day is on October 7th!! We're so excited to bring back another day full of wonderful ...

Strengthen Your Future: A Look Back at Splunk 10 Innovations and .conf25 Highlights!

The Big One: Splunk 10 is Here!  The moment many of you have been waiting for has arrived! We are thrilled to ...

Now Offering the AI Assistant Usage Dashboard in Cloud Monitoring Console

Today, we’re excited to announce the release of a brand new AI assistant usage dashboard in Cloud Monitoring ...