- Mark as New
- Bookmark Message
- Subscribe to Message
- Mute Message
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
NimrodSky
Explorer
09-16-2015
02:27 AM
Hi,
I need to run a search on an event that will return the occasions where this event happened within 5 minutes of the last time it happened.
Would appreciate any pointers to getting this done.
Thanks
Nimrod
1 Solution
- Mark as New
- Bookmark Message
- Subscribe to Message
- Mute Message
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

woodcock
Esteemed Legend
09-16-2015
06:50 AM
Like this:
... | reverse | streamstats current=f last(_time) AS prevTime | eval span=_time - prevTime | where span < 300
- Mark as New
- Bookmark Message
- Subscribe to Message
- Mute Message
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

woodcock
Esteemed Legend
09-16-2015
06:50 AM
Like this:
... | reverse | streamstats current=f last(_time) AS prevTime | eval span=_time - prevTime | where span < 300
- Mark as New
- Bookmark Message
- Subscribe to Message
- Mute Message
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
NimrodSky
Explorer
09-17-2015
12:07 AM
A follow up question - I want to show the previous event as well, so I'll see the two events one after the other
How do I manage this?
Thanks
- Mark as New
- Bookmark Message
- Subscribe to Message
- Mute Message
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

woodcock
Esteemed Legend
09-17-2015
05:35 AM
Either like this:
... | reverse | streamstats current=f last(_time) AS prevTime last(_raw) AS preEvent | eval span = _time - prevTime | where span < 300
Or like ths:
... | streamstats current=f last(_time) AS nextTime | reverse | streamstats current=f last(_time) AS prevTime | eval forespan = nextTime - _time | eval backspan= _time - prevTime | where backspan < 300 OR forespan < 300
- Mark as New
- Bookmark Message
- Subscribe to Message
- Mute Message
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
NimrodSky
Explorer
09-16-2015
07:46 AM
Thanks, that's what I was looking for !
