Knowledge Management

What does bin _time span does here?

sangs8788
Communicator

Hi,

I am having a bit of difficulty understanding what does bin _time span does here. Below is query shared in splunk community to find request per min by OrgName per day

index=data earliest = -1d| bin _time span=1d
 | streamstats count as Req by OrgName, _time
 | eval requestsPerMin=Req/24/60
 | eval requestsPerSec=requestsPerMin/60
 | stats avg(requestsPerMin) as avgRequestPerSec, max(requestsPerMin) as peakRequestPerMin by OrgName, _time

My confusion here is what bin _time span does. I want to find requestPerMin for Last week and month wise too. Could you someone explain how it can be done?

0 Karma
1 Solution

teunlaan
Contributor

With bin _time span you force the _time to be a full day.
So with | bin _time span=1d you get your stats count split by day.

It you want a report it over a week, just do span=1w a moth is span=1mon (do also change the earlies= value )

View solution in original post

0 Karma

teunlaan
Contributor

With bin _time span you force the _time to be a full day.
So with | bin _time span=1d you get your stats count split by day.

It you want a report it over a week, just do span=1w a moth is span=1mon (do also change the earlies= value )

0 Karma
Get Updates on the Splunk Community!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...