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!

Uncovering Multi-Account Fraud with Splunk Banking Analytics

Last month, I met with a Senior Fraud Analyst at a nationally recognized bank to discuss their recent success ...

Secure Your Future: A Deep Dive into the Compliance and Security Enhancements for the ...

What has been announced?  In the blog, “Preparing your Splunk Environment for OpensSSL3,”we announced the ...

New This Month in Splunk Observability Cloud - Synthetic Monitoring updates, UI ...

This month, we’re delivering several platform, infrastructure, application and digital experience monitoring ...