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!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...