Splunk Search

How to generate timechart for eventstats per minute for multisearch

rithick
New Member
index=something     | rex field=_raw ".*\&WST=(?P<MMMId>[^&]+).*"     | search Googly     | dedup MMMId     | bucket_time span=1m    | eventstats count as Total_Volume    | rex field=_raw "&PCS=(?<MMM_Status>\d)\&"     | search MMM_Status="1"     | stats count as Volume values(Total_Volume) as Grand by MMM_Status     | eval MMM_Status=(Volume/Grand)*100.0    | table MMM_Status

i am unable to get MMM_Status per minute for the last 10 minutes. Any inputs.

Tags (2)
0 Karma

arjunpkishore5
Motivator

If I understand your question right, this should do the trick

 index=something  Googly   
 | rex field=_raw ".*\&WST=(?P<MMMId>[^&]+).*"     
 | dedup MMMId
 | rex field=_raw "&PCS=(?<MMM_Status>\d)\&"      
 | timechart span=1m count as Grand, count(eval(MMM_Status=="1")) as Volume 
 | eval MMM_Status=(Volume/Grand)*100.0    
 | fields - Volume, Grand

Hope this helps.

Cheers!

0 Karma

kmaron
Motivator

Try this

index=something 
| rex field=_raw ".*\&WST=(?P<MMMId>[^&]+).*" 
| search Googly 
| dedup MMMId 
| bucket _time span=1m 
| rex field=_raw "&PCS=(?<MMM_Status>\d)\&" 
| stats count as Volume by MMM_Status _time
| eventstats count as Grand
| search MMM_Status="1"
| eval MMM_Status=(Volume/Grand)*100.0 
| timechart span=1m max(MMM_Status)
0 Karma
Get Updates on the Splunk Community!

Built-in Service Level Objectives Management to Bridge the Gap Between Service & ...

Wednesday, May 29, 2024  |  11AM PST / 2PM ESTRegister now and join us to learn more about how you can ...

Get Your Exclusive Splunk Certified Cybersecurity Defense Engineer at Splunk .conf24 ...

We’re excited to announce a new Splunk certification exam being released at .conf24! If you’re headed to Vegas ...

Share Your Ideas & Meet the Lantern team at .Conf! Plus All of This Month’s New ...

Splunk Lantern is Splunk’s customer success center that provides advice from Splunk experts on valuable data ...