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!

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 ...

What's new in Splunk Cloud Platform 9.1.2312?

Hi Splunky people! We are excited to share the newest updates in Splunk Cloud Platform 9.1.2312! Analysts can ...

What’s New in Splunk Security Essentials 3.8.0?

Splunk Security Essentials (SSE) is an app that can amplify the power of your existing Splunk Cloud Platform, ...