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!

Take Your Breath Away with Splunk Risk-Based Alerting (RBA)

WATCH NOW!The Splunk Guide to Risk-Based Alerting is here to empower your SOC like never before. Join Haylee ...

Industry Solutions for Supply Chain and OT, Amazon Use Cases, Plus More New Articles ...

Splunk Lantern is a Splunk customer success center that provides advice from Splunk experts on valuable data ...

Enterprise Security Content Update (ESCU) | New Releases

In November, the Splunk Threat Research Team had one release of new security content via the Enterprise ...