Dashboards & Visualizations

Graph of peak traffic measured by hour

karthy
Explorer

I have an apache-like access log and would like to graph the traffic by hour. However, the graph I want is a graph of the number of requests pr. hour divided by 60*60 so that it is easy to identify the busy hour expressed in requests pr. seconds.

I assume I have to use bins or span, but I have been unsuccessful so far. Any hints?

Tags (1)
1 Solution

David
Splunk Employee
Splunk Employee

If you're looking for the average per hour, I'd go this route:

YourSearch | timechart span=1h count as TotalRequests 
           | eval RequestsPerSecond = TotalRequests/3600

If you wanted to look at the actual busiest second, you could go for:

YourSearch | bucket _time span=1s 
           | stats count as RequestsPerSec by _time 
           | timechart span=1h avg(RequestsPerSec) Max(RequestsPerSec)

View solution in original post

David
Splunk Employee
Splunk Employee

If you're looking for the average per hour, I'd go this route:

YourSearch | timechart span=1h count as TotalRequests 
           | eval RequestsPerSecond = TotalRequests/3600

If you wanted to look at the actual busiest second, you could go for:

YourSearch | bucket _time span=1s 
           | stats count as RequestsPerSec by _time 
           | timechart span=1h avg(RequestsPerSec) Max(RequestsPerSec)

David
Splunk Employee
Splunk Employee

Excellent! I'm glad to hear it.

0 Karma

karthy
Explorer

Thanks - works just right!

0 Karma
Get Updates on the Splunk Community!

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

Let’s Get You Certified – Vegas-Style at .conf24

Are you ready to level up your Splunk game? Then, let’s get you certified live at .conf24 – our annual user ...