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!

Troubleshooting the OpenTelemetry Collector

  In this tech talk, you’ll learn how to troubleshoot the OpenTelemetry collector - from checking the ...

Adoption of Infrastructure Monitoring at Splunk

  Splunk's Growth Engineering team showcases one of their first Splunk product adoption-Splunk Infrastructure ...

Modern way of developing distributed application using OTel

Recently, I had the opportunity to work on a complex microservice using Spring boot and Quarkus to develop a ...