Dashboards & Visualizations

How to return the daily event count of every index?

gazoscreek
Explorer

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.

 

Labels (1)
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
Explorer

Perfect solution. Thank you so much!

0 Karma
Get Updates on the Splunk Community!

.conf24 | Registration Open!

Hello, hello! I come bearing good news: Registration for .conf24 is now open!   conf is Splunk’s rad annual ...

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...