Ad slot: top

SPL

Number of Hosts Associated with a Serverclass

Description

Submitted by SplunkNinja

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

LY
Lyx.Splunk
1/24/2019

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

SP
SplunkNinja Author
1/28/2019

Thanks @Lyx for posting a fix!

Leave a comment

You must log in to post a comment.

Ad slot: bottom