Splunk Search

Why does metadata show the wrong total event count after using the delete command?

neelamssantosh
Contributor

Scenario1:
deleted the events from the indexer1 using the delete command, successfully executed but
1. Still few Host shows up with the event counts

Scenario 2:
Deleted the events from indexer2, Fatal: terminated unsuccessfully but
1. deleted the events manually from Host, but then in metadata it shows the event count
2. when I search for particular host events, it says 0events.

martin_mueller
SplunkTrust
SplunkTrust

Not updating metadata is documented behaviour for the delete command:

The delete operator does not update the metadata of the events, so any metadata searches will still include the events although they are not searchable.

http://docs.splunk.com/Documentation/Splunk/6.2.2/Indexer/RemovedatafromSplunk

martin_mueller
SplunkTrust
SplunkTrust

It's best not to rely on delete too much.

In your scenario it's possible that the delete cleared an entire bucket for removal, thereby cleaning its metadata which might have removed an entire host... that's just a wild guess though.

0 Karma

neelamssantosh
Contributor

Thanks Martin,
Completely agree with you, But why for few hosts it shows the eventsCount and for few it shows with 0events

0 Karma
Get Updates on the Splunk Community!

What's new in Splunk Cloud Platform 9.1.2312?

Hi Splunky people! We are excited to share the newest updates in Splunk Cloud Platform 9.1.2312! Analysts can ...

What’s New in Splunk Security Essentials 3.8.0?

Splunk Security Essentials (SSE) is an app that can amplify the power of your existing Splunk Cloud Platform, ...

Let’s Get You Certified – Vegas-Style at .conf24

Are you ready to level up your Splunk game? Then, let’s get you certified live at .conf24 – our annual user ...