Splunk Search

How to design query to compare values

cbiraris
Path Finder

Can you please help me to build eval query

Condition-1

ABC=Match
XYZ=Match

then output of ABC compare to XYZ is Match

Condition-2

ABC=Match
XYZ=NO_Match

then output of ABC compare to XYZ is No_Match

Condition-3

ABC=NO_Match
XYZ=Match

then output of ABC compare to XYZ is No_Match

Condition-4

ABC=NO_Match
XYZ=NO_Match

then output of ABC compare to XYZ is No_Match


Labels (1)
0 Karma
1 Solution

ITWhisperer
SplunkTrust
SplunkTrust
| eval output=if(ABC="NO_Match" OR XYZ="NO_Match", "NO_Match", "Match")

View solution in original post

0 Karma

ITWhisperer
SplunkTrust
SplunkTrust
| eval output=if(ABC="NO_Match" OR XYZ="NO_Match", "NO_Match", "Match")
0 Karma

cbiraris
Path Finder

Thank you, its working

0 Karma
Get Updates on the Splunk Community!

Splunk Enterprise Security 8.0.2 Availability: On cloud and On-premise!

A few months ago, we released Splunk Enterprise Security 8.0 for our cloud customers. Today, we are excited to ...

Logs to Metrics

Logs and Metrics Logs are generally unstructured text or structured events emitted by applications and written ...

Developer Spotlight with Paul Stout

Welcome to our very first developer spotlight release series where we'll feature some awesome Splunk ...