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!

.conf24 | Registration Open!

Hello, hello! I come bearing good news: Registration for .conf24 is now open!   conf is Splunk’s rad annual ...

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...