Skip to content

Instantly share code, notes, and snippets.

@neilstuartcraig
Created May 21, 2014 08:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save neilstuartcraig/ac8df0a4b17c75ab6d7e to your computer and use it in GitHub Desktop.
Save neilstuartcraig/ac8df0a4b17c75ab6d7e to your computer and use it in GitHub Desktop.
Outputs a count of the number of hosts (servers, network appliances etc. including those whose hostname is just an IP address) which have at least 1 event logged into Splunk in the last 24 hours.
index=* earliest_time=-24h host=* | eval h=lower(host) | stats distinct_count(h)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment