Forum Discussion

Kelemvor's avatar
Kelemvor
Icon for Expert rankExpert
10 days ago

Can I monitor a Linux Process by something other than the name?

Hi,

We have some servers with a certain process we need to monitor.  It's a Java process that runs a specific Jar file.  This is how it show sup in the "Add Other Monitoring" area:

I have a LogicModule to monitor Java processes already, but it goes off the name.  The name of this is just Java, but there could be lots of other things running in Java.  I need to be able to just find the one with the imqbroker.jar part in there.  Unfortunately, I don't know how to do that.

Can it be done in LM easily so I can apply this to a bunch of servers?

Thanks for any help.

  • Heh, I was literally looking at this situation yesterday for Java app monitoring too. So the DataSource will look at both the process name and the arguments to match. So you should be ok with just choosing that entry in the suggested results drop down as long as you don't modify the arguments larger. If you do, you can update the Wildcard Value of the instance though (or redo the entry).

    Notes:

    • Although the drop down does also show the PID (aka "45897" in your screenshot), that will not be in the Wildcard Value itself, so it shouldn't matter if the process restarts and gets a new PID.
    • The arguments does get cut off if it's too long, it looks like around 128 chars or so. Likely a snmp limitation. It will just match on the part it does get.
    • The process name and arguments are matched exactly. The Wildcard Value need to exactly match what snmp returns and doesn't do a partial match. So using "java||imqbroker.jar" will not work. You should be fine though as long as you stick with choosing from the drop down in that Wizard.