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!

Enterprise Security Content Update (ESCU) | New Releases

In December, the Splunk Threat Research Team had 1 release of new security content via the Enterprise Security ...

Why am I not seeing the finding in Splunk Enterprise Security Analyst Queue?

(This is the first of a series of 2 blogs). Splunk Enterprise Security is a fantastic tool that offers robust ...

Index This | What are the 12 Days of Splunk-mas?

December 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...