Getting Data In

Get list of active indexes that are ingesting logs

koyachi
Explorer

Hello,

We have a splunk instance where we have configured security related logs. There are hundreds of indexes created on the instance and now we are planning to disable indexes that are no longer active.

These security logs are now either going to Azure or they are no longer needed so they were stopped by the stakeholders. I am looking for a query that can give me the list of indexes with the most recent event timestamp in respective indexes.

with this details plan is to look for the indexes that have event older than 1 month and consider them as migrated/no longer needed.

Labels (2)
0 Karma
1 Solution

gcusello
SplunkTrust
SplunkTrust

Hi @koyachi,

you could run something like this:

| tstats count latest(_time) AS latest WHERE index=* BY index
| eval latest=strftime(latest,"%Y-%m-%d %H:%M:%S")

Ciao.

Giuseppe

View solution in original post

ITWhisperer
SplunkTrust
SplunkTrust
| metasearch index=*
| stats latest(_time) as _time by index

gcusello
SplunkTrust
SplunkTrust

Hi @koyachi,

you could run something like this:

| tstats count latest(_time) AS latest WHERE index=* BY index
| eval latest=strftime(latest,"%Y-%m-%d %H:%M:%S")

Ciao.

Giuseppe

koyachi
Explorer

Thanks @gcusello . This gives me the info what i need.

0 Karma

gcusello
SplunkTrust
SplunkTrust

Hi @koyachi ,

good for you, see next time!

Ciao and happy splunking

Giuseppe

P.S.: Karma Points are appreciated by all the contributors 😉

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

Splunk AI Assistant for SPL vs. ChatGPT: Which One is Better?

In the age of AI, every tool promises to make our lives easier. From summarizing content to writing code, ...

Data Persistence in the OpenTelemetry Collector

This blog post is part of an ongoing series on OpenTelemetry. What happens if the OpenTelemetry collector ...

Thanks for the Memories! Splunk University, .conf25, and our Community

Thank you to everyone in the Splunk Community who joined us for .conf25, which kicked off with our iconic ...