Splunk Search

How to create a dashboard showing timelines of stats count for last 24 hours across multiple devices?

rogueakula
Explorer

Good morning! I noticed today that a couple of my devices stopped sending logs to Splunk a couple of hours ago. I want to develop a dashboard to show the timelines of stats count by host over the past 24 hours. So, something like this that shows each of my devices for the past 24 hours in one dashboard:

 

rogueakula_0-1594049889454.png

 

I just want to be able to scroll through and make sure that all devices have logged something every hour for the past 24 hours.

 

I am pretty new to Splunk so I dont have a great knowledge base to pull from. Thank you very much for your help!

 

-Josh

Labels (2)
Tags (2)
0 Karma
1 Solution

rogueakula
Explorer

I worked it out. This is what I was looking for:

 

| tstats count where index=my_index sourcetype=my_sourcetype by host _time span=1h
| eval time=_time
| convert ctime(time)
| xyseries time host count

View solution in original post

0 Karma

richgalloway
SplunkTrust
SplunkTrust

See if this gets you started.

 

| tstats prestats=t count where index=my_index sourcetype=my_sourcetype by _time,host
| timechart span=1h count by host

 

---
If this reply helps you, Karma would be appreciated.
0 Karma

rogueakula
Explorer

Thank you for the reply. I put in what wrote and I get "No results found." I am really not sure why that would be. I have 65 devices sending millions of log entries to Splunk.

 

Here is the search that I am using, redacted

 

index=my_index sourcetype=my_sourcetype tstats prestats=t count by _time,host | timechart span=1h count by host

 

When I had the pipe (|) before the tstats it said that tstats needs to be the first item in the search. Thanks again for your help!

 

-Josh

0 Karma

richgalloway
SplunkTrust
SplunkTrust

Why didn't you put in what I wrote?  The error message should have been a clue that you had entered something incorrect.

I've modified my reply to include index and sourcetype.

---
If this reply helps you, Karma would be appreciated.
0 Karma

rogueakula
Explorer

I worked it out. This is what I was looking for:

 

| tstats count where index=my_index sourcetype=my_sourcetype by host _time span=1h
| eval time=_time
| convert ctime(time)
| xyseries time host count

0 Karma
Get Updates on the Splunk Community!

Splunk Observability Cloud’s AI Assistant in Action Series: Analyzing and ...

This is the second post in our Splunk Observability Cloud’s AI Assistant in Action series, in which we look at ...

Elevate Your Organization with Splunk’s Next Platform Evolution

 Thursday, July 10, 2025  |  11AM PDT / 2PM EDT Whether you're managing complex deployments or looking to ...

Splunk Answers Content Calendar, June Edition

Get ready for this week’s post dedicated to Splunk Dashboards! We're celebrating the power of community by ...