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!

See your relevant APM services, dashboards, and alerts in one place with the updated ...

As a Splunk Observability user, you have a lot of data you have to manage, prioritize, and troubleshoot on a ...

Index This | What goes away as soon as you talk about it?

May 2025 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with this month’s ...

What's New in Splunk Observability Cloud and Splunk AppDynamics - May 2025

This month, we’re delivering several new innovations in Splunk Observability Cloud and Splunk AppDynamics ...