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!

Developer Spotlight with Paul Stout

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

State of Splunk Careers 2024: Maximizing Career Outcomes and the Continued Value of ...

For the past four years, Splunk has partnered with Enterprise Strategy Group to conduct a survey that gauges ...

Data-Driven Success: Splunk & Financial Services

Splunk streamlines the process of extracting insights from large volumes of data. In this fast-paced world, ...