Splunk Search

Matching / Compaire 2 Fields

mklhs
Path Finder

Hello,

i would like to find out if both systems deliver the same output.
The output of both systems is written to the same index and differ by the component contained in the event.

e.g:
user=x component=old target=foobar
user=x component=new target=foobar

I now want to find out with a query whether my old and my new system worked the same way and entered the same destination for the event. My question is now how do I write a query that tells me if the output of the old and new system is not the same

Thanks for your Help and your Time

0 Karma
1 Solution

renjith_nair
Legend

@mklhs ,

Try something similar to

|stats latest(eval(if(component="old",target,null()))) as old,latest(eval(if(component="new",target,null()))) as new
|eval status=if(old==new,"Same","Different")
---
What goes around comes around. If it helps, hit it with Karma 🙂

View solution in original post

0 Karma

renjith_nair
Legend

@mklhs ,

Try something similar to

|stats latest(eval(if(component="old",target,null()))) as old,latest(eval(if(component="new",target,null()))) as new
|eval status=if(old==new,"Same","Different")
---
What goes around comes around. If it helps, hit it with Karma 🙂
0 Karma
Get Updates on the Splunk Community!

More Ways To Control Your Costs With Archived Metrics | Register for Tech Talk

Tuesday, May 14, 2024  |  11AM PT / 2PM ET Register to Attend Join us for this Tech Talk and learn how to ...

.conf24 | Personalize your .conf experience with Learning Paths!

Personalize your .conf24 Experience Learning paths allow you to level up your skill sets and dive deeper ...

Threat Hunting Unlocked: How to Uplevel Your Threat Hunting With the PEAK Framework ...

WATCH NOWAs AI starts tackling low level alerts, it's more critical than ever to uplevel your threat hunting ...