Process monitoring

Hello All.

I’m trying to Detect and monitor a service named jstart.exe. I’m able to detect it without problem.

My main issue, on that server, I have 4 jstart.exe process running and I need to make sure that all 4 process are running but NMS is detecting only 1 process of 4.

On the documentation, they talk about some parameter named match-all = true but in the list of available parameter, I’m not having that options. See screenshot.

What I need to do to detect all 4 jstart.exe process and to monitor each of them, because if 1 of 4 is not running, I need an alert.

You’re conflating the function of detectors and monitors. Detectors only detect (are the conditions met for this service to exist?), monitors monitor (is this service in the desired state?).

match-all is a HostResourceSwRunMonitor parameter. You should define a service named SP-JSTART in poller-configuration.xml with the options you require. See Administrators Guide for examples.

Hello.

Thanks for the detail.

But question.
On the server that I’m monitoring, I’m having 4 jstart.exe process running. But in OpenNMS, I’m seeing only 1.

How can I make sure that if 1 jstart.exe process of 4 is going down, or 3 of 4 are down, that I will get an alert? Right now, opennms is only seeing 1 process, not all 4.

If I run snmpwalk, I’m seeing all 4 process.

HOST-RESOURCES-MIB::hrSWRunName.3028 = STRING: “jstart.exe”
HOST-RESOURCES-MIB::hrSWRunName.4972 = STRING: “jstart.exe”
HOST-RESOURCES-MIB::hrSWRunName.6932 = STRING: “jstart.exe”
HOST-RESOURCES-MIB::hrSWRunName.9424 = STRING: “jstart.exe”

Is it only when all 4 will go down that I will get an alert? What I want is to get an alert as soon as 1 is going down.

Thanks

The detector will only detect one service, regardless of the number of processes you’re expecting.

However, the HostResourceSwRunMonitor can verify you have at least min-services showing as running in the hostresourcesswrun table and alarm if not, however this detail is missing from the documentation entirely:
opennms/HostResourceSwRunMonitor.java at bcd0b266b23c458fc30e1c4b47014ff462ae3bd7 · OpenNMS/opennms · GitHub (see min-services / max-services parameters)

So you have a detector that looks for those processes in the HostResourceSWRun table and if they exist, a service SP-JSTART is added. That service represents four jstart.exe processes on your node. If there are not four, it will create a nodeLostService event and an outage.