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.
Get Updates on the Splunk Community!

Tech Talk Recap | Mastering Threat Hunting

Mastering Threat HuntingDive into the world of threat hunting, exploring the key differences between ...

Observability for AI Applications: Troubleshooting Latency

If you’re working with proprietary company data, you’re probably going to have a locally hosted LLM or many ...

Splunk AI Assistant for SPL vs. ChatGPT: Which One is Better?

In the age of AI, every tool promises to make our lives easier. From summarizing content to writing code, ...