Splunk Search

totalCount in |metadata command: current number of events or lifetime count of events?

Jason
Motivator

Is the number of events reported as totalCount in | metadata...

  • the lifetime running total of the events for that (source|sourcetype|host), so the number only goes up

... or ...

  • the current total, so the number could go up and down once buckets start rolling out of indexes?
Tags (1)

rshoward
Path Finder

UPDATE: It is a total indexed over lifetime counter. I ran the trend on a huge data set that has a full index that is cycling out old events. For the last week the totalCount for all assets have only been increasing. The numbers also differ in the billions from the index stats when added up.

----original----

My initial test shows it is the "current total" you speak of; meaning it could go up and down. I'm running another test now with a larger set of data then I'll let you know once I ingest more from another host which should reduce the value of totalCount when the limit is hit. (I have a trend running on that value per host so it should dip once I complete these bulk tests)

0 Karma

rshoward
Path Finder

Jason, sorry for the delay. I let the trend run for a week just to be sure. I've update the answer with my findings.

0 Karma

Jason
Motivator

Thanks. Do you have a result from that larger data set?

0 Karma
Get Updates on the Splunk Community!

Exporting Splunk Apps

Join us on Monday, October 21 at 11 am PT | 2 pm ET!With the app export functionality, app developers and ...

Cisco Use Cases, ITSI Best Practices, and More New Articles from Splunk Lantern

Splunk Lantern is a Splunk customer success center that provides advice from Splunk experts on valuable data ...

Build Your First SPL2 App!

Watch the recording now!.Do you want to SPL™, too? SPL2, Splunk's next-generation data search and preparation ...