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!

Webinar Recap | Revolutionizing IT Operations: The Transformative Power of AI and ML ...

The Transformative Power of AI and ML in Enhancing Observability   In the realm of IT operations, the ...

.conf24 | Registration Open!

Hello, hello! I come bearing good news: Registration for .conf24 is now open!   conf is Splunk’s rad annual ...

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...