SPL
Number of Hosts Associated with a Serverclass
Description
The following query will list the number of hosts associated with all serverclasses on your Splunk Deployment server. This query should be run on your Deployment Server.
2 0
| rest /services/deployment/server/clients splunk_server=local | table hostname applications.*.serverclasses | untable hostname applications | rex field=applications "applications\.(?<apps>.+)\.serverclasses" | stats dc(hostname) as hostname by apps
Comments
2 total
If this query does not work for you try: \r\n| rest /services/deployment/server/clients splunk_server=local | table hostname applications.*.serverclasses | untable hostname, applications, serverclass | rex field=applications \"applications\.(?<apps>.+)\.serverclasses\" | stats dc(hostname) as hostname b
Thanks @Lyx for posting a fix!
Leave a comment
You must log in to post a comment.