Splunk Search

List of Serverclass and apps in deployment server

shinde0509
Explorer

SPlunk SPL query to list unique serverclass and Apps present in deployment server.

Labels (4)
0 Karma

richgalloway
SplunkTrust
SplunkTrust

Run this query on the DS

 

| rest /services/deployment/server/serverclasses splunk_server=local
| append [| rest /services/deployment/server/applications splunk_server=local]

 

---
If this reply helps you, Karma would be appreciated.
0 Karma

gcusello
SplunkTrust
SplunkTrust

Hi @shinde0509,

I did it some years ago, see if it's still working:

| rest splunk_server=local /services/deployment/server/clients\
| search ip=xx.xx.xx.xx\
| table hostname ip utsname *.restartSplunkd\
| eval temp=hostname."#".ip."#".utsname \
| table temp *.restartSplunkd\
| untable temp apps count \
| eval Apps=if(like(apps,"app%"),mvindex(split(apps,"."),1),null()) \
| eval ServerClass=if(like(apps,"server%"),mvindex(split(apps,"."),1),null() ) \
| rex field=temp "(?<Host>.*)#(?<Host_IP>.*)#(?<Machine_Type>.*)" \
| table Host Host_IP Machine_Type Apps ServerClass \
| stats Values(*) as * by Host Host_IP Machine_Type\
| nomv Apps\
| nomv ServerClass\

Ciao.

Giuseppe

0 Karma
Get Updates on the Splunk Community!

October Community Champions: A Shoutout to Our Contributors!

As October comes to a close, we want to take a moment to celebrate the people who make the Splunk Community ...

Community Content Calendar, November Edition

Welcome to the November edition of our Community Spotlight! Each month, we dive into the Splunk Community to ...

Stay Connected: Your Guide to November Tech Talks, Office Hours, and Webinars!

What are Community Office Hours? Community Office Hours is an interactive 60-minute Zoom series where ...