Splunk Search

How to create a list of all indexes with source, host, and sourcetype with last seen field?

mpham07
Path Finder

Hello all, I'm currently working on figuring how to create a list of as mentioned in the title with the last seen field.
This field will show when the host was last seen in our logs.

It's kind of similar to the solution below but will only list last seen time for all hosts.

Thank you in advance for your assistance.

https://answers.splunk.com/answers/332987/how-to-search-the-list-of-devices-that-have-sent-l.html

0 Karma
1 Solution

jaime_ramirez
Communicator

Like this?

| tstats latest(_time) as latest where (index=* earliest=-1mon@mon  latest=-0h@h) by index host source sourcetype
| convert ctime(latest)

View solution in original post

jaime_ramirez
Communicator

Like this?

| tstats latest(_time) as latest where (index=* earliest=-1mon@mon  latest=-0h@h) by index host source sourcetype
| convert ctime(latest)

mpham07
Path Finder

Thank you so much Jaime! Worked out perfectly and extremely fast search.

0 Karma
Get Updates on the Splunk Community!

Cloud Platform & Enterprise: Classic Dashboard Export Feature Deprecation

As of Splunk Cloud Platform 9.3.2408 and Splunk Enterprise 9.4, classic dashboard export features are now ...

Explore the Latest Educational Offerings from Splunk (November Releases)

At Splunk Education, we are committed to providing a robust learning experience for all users, regardless of ...

New This Month in Splunk Observability Cloud - Metrics Usage Analytics, Enhanced K8s ...

The latest enhancements across the Splunk Observability portfolio deliver greater flexibility, better data and ...