Splunk Search

How to I specify a *minimum* time between events?

Tisiphone
Engager

There are plenty of ways to specify the exact time range or maximum range between two events in a search. But I need to specify a minimum.

My search is: index=antivirus INFECTION dedup 1 infection host | top host limit="10"

It correctly finds my top 10 infected hosts by distinct viral infection and host. However, I want to make sure there is over X amount of time between each event, because I want to catch Bob the Bittorrenter who gets a new infection every week, and not Sue the Surfer who downloads one bad file and gets 8 infections in less than minute.

I've tried building a timechart, "transaction infection,host maxspan=X", and specifying a bucket on _time, but everything seems to give me the opposite of what I need.

Tags (2)
1 Solution

gkanapathy
Splunk Employee
Splunk Employee

I'm not sure why | transaction infection,host maxspan=X | top host doesn't work for you. Perhaps | transaction infection,host maxpause=X | top host works better (though similarly, but both of those will group together infections into a single event if they are close enough, leaving you with blocks of infections separated by the time range.

Possibly you are interpreting the results backwards, but since transaction groups together things that are closer than your max ranges (whether the overall range or the time between infections), you don't look inside the transaction, you look at each separate transaction and count those.

View solution in original post

gkanapathy
Splunk Employee
Splunk Employee

I'm not sure why | transaction infection,host maxspan=X | top host doesn't work for you. Perhaps | transaction infection,host maxpause=X | top host works better (though similarly, but both of those will group together infections into a single event if they are close enough, leaving you with blocks of infections separated by the time range.

Possibly you are interpreting the results backwards, but since transaction groups together things that are closer than your max ranges (whether the overall range or the time between infections), you don't look inside the transaction, you look at each separate transaction and count those.

Get Updates on the Splunk Community!

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...

Introducing the 2024 Splunk MVPs!

We are excited to announce the 2024 cohort of the Splunk MVP program. Splunk MVPs are passionate members of ...

Splunk Custom Visualizations App End of Life

The Splunk Custom Visualizations apps End of Life for SimpleXML will reach end of support on Dec 21, 2024, ...