Dashboards & Visualizations

Query for processes status from multiple hosts

splunker_ind
Loves-to-Learn

Hi Splunkers, 

I have a 2 hosts i.e server1 & server2.

Each host running with multiple processes. Lets say the processes are process1 & process2.

I want to create a dashboard to show the latest processes status whether it is Running or Not Running in each host

 

index=os host IN (server1 server2)  ARGS=*process1* OR ARGS=*process2*
| eval process1_status=if(like(ARGS,"%process1%"),"Running","Not Running")
| eval process2_status=if(like(ARGS,"%process2%"),"Running","Not Running")
| stats latest(process1_status)  latest(process2_status)  by host
| fillnull value=NULL

But this query is not giving correct results.

Each event will have either ARGS field as process1 or ARGS field as process2.

 

 

Labels (3)
0 Karma

splunker_ind
Loves-to-Learn

I used join command which works fine but it takes time.

0 Karma
Get Updates on the Splunk Community!

Unleash the Power of Splunk MCP and AI, Meet Us at .Conf 2025, and Find Even More New ...

Splunk Lantern is a Splunk customer success center that provides advice from Splunk experts on valuable data ...

Observability Professionals: Build Resilience and Visibility with These .conf25 ...

  If you're focused on performance, availability, and full-stack visibility, the Observability track at ...

See just what you’ve been missing | Observability tracks at Splunk University

Looking to sharpen your observability skills so you can better understand how to collect and analyze data from ...