cancel
Showing results for 
Search instead for 
Did you mean: 
Create Post
Level 13

How to get programmatically get real-time processes for a node?

I want to build an app monitor around the real-time process explorer so I can calculate the number of instances of a process on a node. For instance, I want to trigger an alert if there are more than 20 instances of httpd running. The SNMP process monitor will tell me if the process isn't found, but it can't tell me how many instances are running.

I know I can call \SolarWinds\Orion\APM\SolarWinds.APM.RealTimeProcessPoller.exe on my main poller to get the list of running processes, but I can't call it on an APE because it isn't installed on the APEs. This means I can't just call it from a Powershell Script monitor, because app monitors run on the polling engine that handles the node.

Does anyone know how the Real-Time Process Explorer accomplishes this? I've looked at the script for /Orion/APM/Admin/RealtimeProcesses/Default.aspx?NodeId=xxxx, but I can't tell where the call to get the list of processes occurs.

Alternatively, is there a parameter to force /Orion/APM/Admin/RealtimeProcesses/Default.aspx?NodeId=xxxx to show all processes instead of the default 10? If I can make it show all processes, I can call the URL and parse out the processes and then count them.

Thanks!

0 Kudos
1 Reply
Level 13

Another option would be a Linux script monitor and then do a ps -f and grep for the processes you are looking for with a word count. 

This example counts all java processes running under a service account.

$!/bin/bash
# SDSI processes check
# use backticks " ` ` " to execute shell command

SDSI_java=`ps -f -u svc_wodm_s | grep /opt/ibm/ODMInsights88/jre/bin/java | wc -l`

echo Statistic.SDSI_java: "$SDSI_java"
echo Message.SDSI_java: "$SDSI_java java Running Process under svc_wodm_s"

0 Kudos