Getting Data In

query for searching passive hosts

kteng2024
Path Finder

Can someone please explain me what does the following query will do step by step ?

  type=hosts | sort -recentTime | convert ctime(recentTime) as Latest_Time

thank you

0 Karma

richgalloway
SplunkTrust
SplunkTrust

That query is not valid. I believe the correct version would be

| metadata type=hosts | sort -recentTime | convert ctime(recentTime) as Latest_Time

which retrieves a list of host names from the default indexes, sorts them from most-recently used to least-recently used, then converts the recentTime field from epoch format into text and renames it to Latest_Time.

---
If this reply helps you, Karma would be appreciated.
Get Updates on the Splunk Community!

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...

Introducing the 2024 Splunk MVPs!

We are excited to announce the 2024 cohort of the Splunk MVP program. Splunk MVPs are passionate members of ...

Splunk Custom Visualizations App End of Life

The Splunk Custom Visualizations apps End of Life for SimpleXML will reach end of support on Dec 21, 2024, ...