Monitor process UBuntu

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Naveed
Posts: 285
Joined: Mon May 30, 2016 10:10 am

Monitor process UBuntu

Post by Naveed »

Hello,

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

kindly assist.

Thank you!
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Monitor process UBuntu

Post 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
Former Nagios employee
Naveed
Posts: 285
Joined: Mon May 30, 2016 10:10 am

Re: Monitor process UBuntu

Post by Naveed »

I want to monitor java process running on web server and mysql process on db server.
User avatar
mcapra
Posts: 3739
Joined: Thu May 05, 2016 3:54 pm

Re: Monitor process UBuntu

Post by mcapra »

Is using an agent like NRPE or NCPA an option? Were you looking for an agentless solution?
Former Nagios employee
https://www.mcapra.com/
Naveed
Posts: 285
Joined: Mon May 30, 2016 10:10 am

Re: Monitor process UBuntu

Post by Naveed »

Any kind of solution!

agentless or with agent
User avatar
mcapra
Posts: 3739
Joined: Thu May 05, 2016 3:54 pm

Re: Monitor process UBuntu

Post 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.
Former Nagios employee
https://www.mcapra.com/
Naveed
Posts: 285
Joined: Mon May 30, 2016 10:10 am

Re: Monitor process UBuntu

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

Re: Monitor process UBuntu

Post 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 :)
Former Nagios employee
https://www.mcapra.com/
Naveed
Posts: 285
Joined: Mon May 30, 2016 10:10 am

Re: Monitor process UBuntu

Post 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!
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: Monitor process UBuntu

Post 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.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked