Monitoring Multiple Processes with same name On linux

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
ushahab88
Posts: 15
Joined: Mon Apr 24, 2017 11:36 am

Monitoring Multiple Processes with same name On linux

Post 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.
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

Re: Monitoring Multiple Processes with same name On linux

Post 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
User avatar
mcapra
Posts: 3739
Joined: Thu May 05, 2016 3:54 pm

Re: Monitoring Multiple Processes with same name On linux

Post 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.
Former Nagios employee
https://www.mcapra.com/
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

Re: Monitoring Multiple Processes with same name On linux

Post 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
Locked