Dashboards & Visualizations

How to return the daily event count of every index?

gazoscreek
Path Finder

Does anyone have a solution for a query that will return the daily event count of every index, index by index, even the ones that have ingested zero events?

| tstats count WHERE index=* OR index=_* by index ... only returns indexes that have > 0 events.

 

Tags (2)
1 Solution

VatsalJagani
SplunkTrust
SplunkTrust

Run this search:

| tstats count WHERE index=* OR index=_* by index
| append [| rest /servicesNS/-/-/data/indexes count=0 | fields title | dedup title | rename title as index | eval count=0]
| stats sum(count) as count by index

 

I hope this helps!! Accept the answer if it does!!

View solution in original post

0 Karma

VatsalJagani
SplunkTrust
SplunkTrust

Run this search:

| tstats count WHERE index=* OR index=_* by index
| append [| rest /servicesNS/-/-/data/indexes count=0 | fields title | dedup title | rename title as index | eval count=0]
| stats sum(count) as count by index

 

I hope this helps!! Accept the answer if it does!!

0 Karma

gazoscreek
Path Finder

Perfect solution. Thank you so much!

0 Karma
Get Updates on the Splunk Community!

Demo Day: Strengthen Your SOC with Splunk Enterprise Security 8.1

Today’s threat landscape is more complex than ever. Security operation centers (SOCs) are overwhelmed with ...

Dashboards: Hiding charts while search is being executed and other uses for tokens

There are a couple of features of SimpleXML / Classic dashboards that can be used to enhance the user ...

Splunk Observability Cloud's AI Assistant in Action Series: Explaining Metrics and ...

This is the fourth post in the Splunk Observability Cloud’s AI Assistant in Action series that digs into how ...