Page 1 of 2

Monitor process UBuntu

Posted: Mon Aug 29, 2016 12:58 pm
by Naveed
Hello,

I want to monitor different java/ ssh etc processes on ubuntu with nagios xi.

kindly assist.

Thank you!

Re: Monitor process UBuntu

Posted: Mon Aug 29, 2016 1:04 pm
by tmcdonald
Without knowing more specifically what it is you care to monitor, the following articles are likely a good starting point:

https://assets.nagios.com/downloads/nag ... g_NRPE.pdf
https://assets.nagios.com/downloads/nag ... ng_SSH.pdf
https://assets.nagios.com/downloads/nag ... ios-XI.pdf

Re: Monitor process UBuntu

Posted: Mon Aug 29, 2016 1:49 pm
by Naveed
I want to monitor java process running on web server and mysql process on db server.

Re: Monitor process UBuntu

Posted: Mon Aug 29, 2016 2:38 pm
by mcapra
Is using an agent like NRPE or NCPA an option? Were you looking for an agentless solution?

Re: Monitor process UBuntu

Posted: Mon Aug 29, 2016 2:50 pm
by Naveed
Any kind of solution!

agentless or with agent

Re: Monitor process UBuntu

Posted: Mon Aug 29, 2016 2:57 pm
by mcapra
One of the documents provided by @tmcdonald provides some steps for setting up the NRPE agent:
https://assets.nagios.com/downloads/nag ... g_NRPE.pdf

We also have a trouble shooting document that might be useful if you run into problems:
https://assets.nagios.com/downloads/nag ... utions.pdf

Once you have NRPE installed and listening on the remote machine, you could use the check_procs command to make sure the Java process is running like so:

Code: Select all

[root@localhost libexec]# ./check_nrpe -H 192.168.67.97 -c check_procs -a "-c 1: -C java"
PROCS CRITICAL: 0 processes with command name 'java' | procs=0;;1:;0;
Since Java is not running on my remote machine, a "critical" state is returned.

Re: Monitor process UBuntu

Posted: Mon Aug 29, 2016 3:25 pm
by Naveed
[root@AXmonitor libexec]# ./check_nrpe -H 1.2.3.4 -c check_procs -a "-c 1: -C java"
CHECK_NRPE: Received 0 bytes from daemon. Check the remote server logs for error messages.
[root@AXmonitor libexec]#

I have troubleshoot alot from internet and found that dont_blame_nrpe=1 and restart nrpe service.

I have installed the nrpe agent by using following how-to

http://tecadmin.net/install-nrpe-on-ubuntu/#

Operating system= Ubuntu

Re: Monitor process UBuntu

Posted: Mon Aug 29, 2016 3:30 pm
by mcapra
I would suggest following our official documentation for installing NRPE:
https://assets.nagios.com/downloads/nag ... _Agent.pdf

I would also suggest resolving the specific NRPE issues you are experiencing in your other thread first:
https://support.nagios.com/forum/viewto ... 991#194165

Otherwise it will be difficult to check a specific process with NRPE when it is non-functional :)

Re: Monitor process UBuntu

Posted: Wed Aug 31, 2016 3:30 pm
by Naveed
All my monitoring is fine with nrpe, but still I am unable to monitor java process with given command.

[root@AXmonitor libexec]# ./check_nrpe -H 1.2.3.4 -p 5666 -c check_procs -a '-c 1: -C java'
CHECK_NRPE: Received 0 bytes from daemon. Check the remote server logs for error messages.

Kindly assist.

Thank you!

Re: Monitor process UBuntu

Posted: Wed Aug 31, 2016 4:50 pm
by tgriep
Verify that the command is setup in the nrpe.cfg or common.cfg file on the remote system is setup and that the arguments are defined correctly for that command.