Splunk Search

How to compare two fields in a event and list out the field when one of the fields does not exist?

bollam
Path Finder

Hello,
I have a multiple events in a log file which contains field A and field B but not in all the events, I need to compare the field B with field A, If field B does not exist in any of the events then I need to list out the field B values.

Tags (3)
0 Karma

woodcock
Esteemed Legend

That last sentence does not seem to make sense. Maybe the last B should be A? Sample events and output mockup for both scenarios will help us help you.

p_gurav
Champion

Can you give sample logs? Or explain with sample values?

Get Updates on the Splunk Community!

Splunk Observability for AI

Don’t miss out on an exciting Tech Talk on Splunk Observability for AI!Discover how Splunk’s agentic AI ...

Splunk Enterprise Security 8.x: The Essential Upgrade for Threat Detection, ...

Watch On Demand the Tech Talk, and empower your SOC to reach new heights! Duration: 1 hour  Prepare to ...

Splunk Observability as Code: From Zero to Dashboard

For the details on what Self-Service Observability and Observability as Code is, we have some awesome content ...