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
SplunkTrust
SplunkTrust

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
Get Updates on the Splunk Community!

Community Content Calendar, November Edition

Welcome to the November edition of our Community Spotlight! Each month, we dive into the Splunk Community to ...

October Community Champions: A Shoutout to Our Contributors!

As October comes to a close, we want to take a moment to celebrate the people who make the Splunk Community ...

Stay Connected: Your Guide to November Tech Talks, Office Hours, and Webinars!

What are Community Office Hours? Community Office Hours is an interactive 60-minute Zoom series where ...