Splunk Search

Transaction to show events with more than 1 source only

axinjakson
Explorer

I am attempting to search across 3 different sources and provide events that occur on more than 1 source only. Meaning firewall1 and firewall2 saw events in say, the same 20 minute window...

I am able to do this with a huge "stats values" table output and "search where" after, however I feel that is terribly inefficient.

Looking for something to output either raw event logs or to a table is fine, stats with count, etc etc. I am open to suggestions.

Here is my basic thought for the search, attempting src+dst IP pairs as the unique identifier

source1 OR source2 OR source3 | transaction src,dst where source>1 maxspan=20m

0 Karma
1 Solution

Ayn
Legend

You could use streamstats to get a distinct count of sources for each transaction and then single out the transactions with more than one source using where:

source="source1" OR source="source2" OR source="source3" | transaction src,dst maxspan=20m | streamstats window=1 dc(source) AS sourcecount | where sourcecount>1

View solution in original post

Ayn
Legend

You could use streamstats to get a distinct count of sources for each transaction and then single out the transactions with more than one source using where:

source="source1" OR source="source2" OR source="source3" | transaction src,dst maxspan=20m | streamstats window=1 dc(source) AS sourcecount | where sourcecount>1
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 ...