Splunk Search

How to create timechart for event spikes by comparing to the previous 10 minute?

ygzamx
Engager

Hi all!

I'm trying to create a Timechart showing only the graph bars where the number of events is 2X the number of events from the previous 10 minutes. 

 

E.g. if I have 10,000 events at 10:10 AM to 10:20 AM

and 30,000 at 10:20 AM -10:30 AM

then 35,000 at 10:30 AM to 10:40 AM

 

I want the timechart to show only the bar for 10:20-10:30 period, which is where the surge happened.

 

Hope that makes sense, thanks in advance!

Labels (2)
0 Karma
1 Solution

somesoni2
Revered Legend

Try something like this (runanywhere sample, adjust per your query)

index = _internal sourcetype=splunk_web_access 
| timechart span=10m count
|  delta count as countdiff 
|  eval surge=(countdiff)/if(count-countdiff=0,1,count-countdiff) 
|  where surge>2

 

View solution in original post

0 Karma

somesoni2
Revered Legend

Try something like this (runanywhere sample, adjust per your query)

index = _internal sourcetype=splunk_web_access 
| timechart span=10m count
|  delta count as countdiff 
|  eval surge=(countdiff)/if(count-countdiff=0,1,count-countdiff) 
|  where surge>2

 

0 Karma

ygzamx
Engager

Thank you! it works!

0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.

Can’t make it to .conf25? Join us online!

Get Updates on the Splunk Community!

Community Content Calendar, September edition

Welcome to another insightful post from our Community Content Calendar! We're thrilled to continue bringing ...

Splunkbase Unveils New App Listing Management Public Preview

Splunkbase Unveils New App Listing Management Public PreviewWe're thrilled to announce the public preview of ...

Leveraging Automated Threat Analysis Across the Splunk Ecosystem

Are you leveraging automation to its fullest potential in your threat detection strategy?Our upcoming Security ...