Page 1 of 1

Monitoring Multiple Processes with same name On linux

Posted: Mon Aug 07, 2017 2:22 am
by ushahab88
Hi All,

I want to monitor different processes which are running on linux servers under the same name. suppose we have some applications which are running under java platform, when i try to monitor through SNMP string it can only tells that these number of java processes are running but.. if any of this java process goes down.. it didn't generate any alert.

kindly guide me regarding this.

Re: Monitoring Multiple Processes with same name On linux

Posted: Mon Aug 07, 2017 3:37 pm
by dwhitfield
Nagios can only act on what SNMP gives it. It looks like you'll need to use a different check method. I would suggest check_jmx: https://assets.nagios.com/downloads/nag ... ios-XI.pdf

Re: Monitoring Multiple Processes with same name On linux

Posted: Tue Aug 08, 2017 9:13 am
by mcapra
Alternatively, with check_procs you could match on the arguments provided to the java process. So if you had processes like so:

Code: Select all

java -jar logstash.jar
java -jar elasticsearch.jar
java -jar some_other_artifact.war
You could monitor the Logstash process specifically by leveraging the -a argument:

Code: Select all

check_procs -c 1:1 -C java -a logstash.jar
This would require an agent (NRPE, NCPA, NSClient++) on the remote machine, though. Or you could call check_procs by leveraging something like check_by_ssh. I think the basic SNMP setups for most systems will provide process arguments as a specific OID, but you'd still need a plugin that can look for that OID.

Re: Monitoring Multiple Processes with same name On linux

Posted: Tue Aug 08, 2017 1:34 pm
by dwhitfield
Thanks @mcapra!

We don't know at this point if you are using XI or Core, but as far as check_by_ssh is concerned, you might take a look at https://assets.nagios.com/downloads/nag ... ng_SSH.pdf