Dashboards & Visualizations

Count number of incidents per hour\day

scottmkirkland
Explorer

I'm trying to get a table or heatmap of a count of incidents that occur by day and hour....My results make sense, except I'm only getting hours 8 through 20. I know incidents occur round the clock. So, I should be seeing a count for each hour.

Any suggestions?

 

 

| eval date_hour=strftime(_time, "%H") 
| eval date_wday=strftime(_time, "%A")  
| chart dc(RMI_MastIncNumb) AS incidents over date_wday by date_hour useother=f 
| eval wd=lower(date_wday) 
| eval sort_field=case(wd=="monday",2, wd=="tuesday",3, wd=="wednesday",4, wd=="thursday",5, wd=="friday",6, wd=="saturday",7, wd="sunday", 1)
| sort sort_field
| fields - sort_field wd

 

 

scottmkirkland_0-1738187365175.png

 

Labels (1)
0 Karma
1 Solution

ITWhisperer
SplunkTrust
SplunkTrust
| eval date_hour=strftime(_time, "%H") 
| eval date_wday=strftime(_time, "%A")  
| chart dc(RMI_MastIncNumb) AS incidents over date_wday by date_hour useother=f limit=0 
| eval wd=lower(date_wday) 
| eval sort_field=case(wd=="monday",2, wd=="tuesday",3, wd=="wednesday",4, wd=="thursday",5, wd=="friday",6, wd=="saturday",7, wd="sunday", 1)
| sort sort_field
| fields - sort_field wd

View solution in original post

0 Karma

ITWhisperer
SplunkTrust
SplunkTrust
| eval date_hour=strftime(_time, "%H") 
| eval date_wday=strftime(_time, "%A")  
| chart dc(RMI_MastIncNumb) AS incidents over date_wday by date_hour useother=f limit=0 
| eval wd=lower(date_wday) 
| eval sort_field=case(wd=="monday",2, wd=="tuesday",3, wd=="wednesday",4, wd=="thursday",5, wd=="friday",6, wd=="saturday",7, wd="sunday", 1)
| sort sort_field
| fields - sort_field wd
0 Karma
Get Updates on the Splunk Community!

Observe and Secure All Apps with Splunk

  Join Us for Our Next Tech Talk: Observe and Secure All Apps with SplunkAs organizations continue to innovate ...

Splunk Decoded: Business Transactions vs Business IQ

It’s the morning of Black Friday, and your e-commerce site is handling 10x normal traffic. Orders are flowing, ...

Fastest way to demo Observability

I’ve been having a lot of fun learning about Kubernetes and Observability. I set myself an interesting ...