Getting Data In

Transaction Command: Determine Outliers/Mismatches Only

bcarr12
Path Finder

I am using the transaction command in Splunk to group the events of an identical log file across two hosts. Essentially, the field=value pairs across both hosts should be identical at all times. From time to time, issues can issue that cause the two hosts to become out of sync. I'd like to have a search that only identifies transactions where the field=value pairs do not match exactly. What would be the best way to accomplish this?

For instance, using the search below groups the log files from multiple hosts into a single transaction by second.
"searchterm" source="mylog.log" | transaction field maxspan=1s

I want to only return events with the below pattern (mismatches)
2020-01-10 17:30:00,348 INFO field=true
2020-01-10 17:30:00,351 INFO field=false

But ignore events with this pattern (identical)
2020-01-10 17:30:00,348 INFO field=true
2020-01-10 17:30:00,351 INFO field=true

Or this pattern (identical)
2020-01-10 17:30:00,348 INFO field=false
2020-01-10 17:30:00,351 INFO field=false

0 Karma

to4kawa
Ultra Champion
"searchterm" source="mylog.log" 
| streamstats time_window=1s dc(field) as flag
| where flag >1

how about this?

0 Karma
Get Updates on the Splunk Community!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...