Splunk Search

Flooring the minutes of a strftime eval

metersk
Path Finder
earliest=-14d@d latest=-0d@d ns=email msg=send country="United Kingdom" | eval time=strftime(_time,"%H:%M") | chart count by time, msg

In the query above, I'd like to floor the %M by 5 minutes so that sums of every 5 minutes are displayed instead of every minute. Is this possible?

Or maybe even some sort of groupby function that I can apply?

0 Karma
1 Solution

masonmorales
Influencer
 earliest=-14d@d latest=-0d@d ns=email msg=send country="United Kingdom" | eval time=strftime(_time,"%H:%M") | bucket _time span=5m | chart count by _time, msg

View solution in original post

masonmorales
Influencer
 earliest=-14d@d latest=-0d@d ns=email msg=send country="United Kingdom" | eval time=strftime(_time,"%H:%M") | bucket _time span=5m | chart count by _time, msg
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 ...