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")
Happy Splunking!

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")
Happy Splunking!
0 Karma
Get Updates on the Splunk Community!

New in Observability Cloud - Explicit Bucket Histograms

Splunk introduces native support for histograms as a metric data type within Observability Cloud with Explicit ...

Updated Team Landing Page in Splunk Observability

We’re making some changes to the team landing page in Splunk Observability, based on your feedback. The ...

New! Splunk Observability Search Enhancements for Splunk APM Services/Traces and ...

Regardless of where you are in Splunk Observability, you can search for relevant APM targets including service ...