Getting Data In

How can I get oldest event per host from metadata

a212830
Champion

Hi,

Is there a way to get the oldest event dates for certain hosts using metadata?

Tags (2)
0 Karma

MuS
Legend

Hi a212830,

from the docs http://docs.splunk.com/Documentation/Splunk/6.2.0/SearchReference/Metadata

firstTime is the timestamp for the first time that the indexer saw an event from this host.

Does this not do the job for you? For me it works:

alt text

somesoni2
Revered Legend

The metadata command doesn't provide you mapping of index/sourcetype and host at once. Try following (will take more time but may be the only option)

| metasearch index=* sourcetype=* host=* | stats min(_time) as firstTime by index sourcetype host
0 Karma

a212830
Champion

Sorry - actually needs to include host, index and sourcetype. I get a lot of data for these hosts, so using metadata would be a hug help. We are concerned that data is dropping.

0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.

Can’t make it to .conf25? Join us online!

Get Updates on the Splunk Community!

Community Content Calendar, September edition

Welcome to another insightful post from our Community Content Calendar! We're thrilled to continue bringing ...

Splunkbase Unveils New App Listing Management Public Preview

Splunkbase Unveils New App Listing Management Public PreviewWe're thrilled to announce the public preview of ...

Leveraging Automated Threat Analysis Across the Splunk Ecosystem

Are you leveraging automation to its fullest potential in your threat detection strategy?Our upcoming Security ...