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

What Is Splunk? Here’s What You Can Do with Splunk

Hey Splunk Community, we know you know Splunk. You likely leverage its unparalleled ability to ingest, index, ...

Level Up Your .conf25: Splunk Arcade Comes to Boston

With .conf25 right around the corner in Boston, there’s a lot to look forward to — inspiring keynotes, ...

Manual Instrumentation with Splunk Observability Cloud: How to Instrument Frontend ...

Although it might seem daunting, as we’ve seen in this series, manual instrumentation can be straightforward ...