Splunk Search

tstats not match with metrics.log

new2spl_unk
Explorer

Hi all,

Why the count of  "Event per day" in the "Indexing audit" dashboard is not match with |tstats result? 

Eg.

The number from  "Event per day" in the "Indexing audit" dashboard:

index count 

main 10000

 

The number from |tstats count where index=main by index:

index count 

main 500

 

May I know which one is correct?

Labels (2)
0 Karma

richgalloway
SplunkTrust
SplunkTrust

It's possible both are correct. Or neither is correct.  The two use different methods to arrive at numbers that may or may not represent the same thing.  Also, we don't know the time window of each search.

The Indexing Audit dashboard uses a lookup table which is populated by a saved search.  That search pulls data from metrics.log, which is a sampling of events rather than a true count.

The tstats query is counting actual events present in the index at the time the query runs.

---
If this reply helps you, Karma would be appreciated.
0 Karma

new2spl_unk
Explorer

Assume the time window is same. But from my environment,

the count from indexing audit dashboard is always 4-5 times more than the result from |tstats. If I want to know the Event per day. Which method is more accurate? 

0 Karma

richgalloway
SplunkTrust
SplunkTrust

tstats is a count of all events whereas the Indexing Audit dashboard counts a sample of events.  I would say tstats is more accurate.

---
If this reply helps you, Karma would be appreciated.
0 Karma

new2spl_unk
Explorer

Thanks for your response. Can you explain more on  the "Indexing Audit dashboard" like how it counts the event count exactly. As it count on sample of event then the count should lower than |tstats count? Then why my "Indexing Audit dashboard" always 4-5 times higher than |tstats count ? 

0 Karma

richgalloway
SplunkTrust
SplunkTrust

The dashboard gets its data from a KVStore lookup (licensing_epd).  If the data in that lookup is inaccurate then so will the dashboard.  See the Audit - Events Per Day - Lookup Gen saved search for how the lookup is populated.

---
If this reply helps you, Karma would be appreciated.
0 Karma
Get Updates on the Splunk Community!

Routing logs with Splunk OTel Collector for Kubernetes

The Splunk Distribution of the OpenTelemetry (OTel) Collector is a product that provides a way to ingest ...

Welcome to the Splunk Community!

(view in My Videos) We're so glad you're here! The Splunk Community is place to connect, learn, give back, and ...

Tech Talk | Elevating Digital Service Excellence: The Synergy of Splunk RUM & APM

Elevating Digital Service Excellence: The Synergy of Real User Monitoring and Application Performance ...