Splunk Search

Which is this the best way to get a count of events indexed for entire environment?

bgagliardi1
Path Finder

Blockquote
1.
| eventcount summarize=false | stats sum(count)

Blockquote

OR

Blockquote
2.
https://docs.splunk.com/Documentation/Splunk/7.2.3/Troubleshooting/Aboutmetricslog

index=_internal source=*metrics.log group=thruput | stats sum(ev)

Blockquote

My use case is currently for last 30 days, and I am getting very different results. The first search command appears to be identical to the dashboard that shows up on the "What to Search" section on the search and reporting home page.

The metrics.log I want to believe to be more accurate given that I can't do a time modifier on the first search command, "| eventcount."

Tags (1)
0 Karma

vishaltaneja070
Motivator

Hello @bgagliardi1

What about this:

| tstats count WHERE index=*
0 Karma
Get Updates on the Splunk Community!

Index This | Why did the turkey cross the road?

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

Enter the Agentic Era with Splunk AI Assistant for SPL 1.4

  🚀 Your data just got a serious AI upgrade — are you ready? Say hello to the Agentic Era with the ...

Feel the Splunk Love: Real Stories from Real Customers

Hello Splunk Community,    What’s the best part of hearing how our customers use Splunk? Easy: the positive ...