Page 3 of 3

Re: How to monitor long running processes?

Posted: Tue Oct 09, 2018 1:39 am
by Siddharth Hegde
I am getting this error

Code: Select all

Current Status:	  UNKNOWN   (for 0d 0h 21m 6s)
Status Information:	NRPE: Command 'check_process' not defined
Performance Data:	
Current Attempt:	3/3  (HARD state)
Last Check Time:	10-09-2018 06:24:38
Check Type:	ACTIVE
Check Latency / Duration:	0.000 / 0.024 seconds
Next Scheduled Check:  	10-09-2018 06:34:38
Last State Change:	10-09-2018 06:10:38
Last Notification:	N/A (notification 0)
Is This Service Flapping?	  NO   (6.12% state change)
In Scheduled Downtime?	  NO  
Last Update:	10-09-2018 06:31:41  ( 0d 0h 0m 3s ago)
Is there anything else I need to change or add?

Re: How to monitor long running processes?

Posted: Tue Oct 09, 2018 10:55 am
by cdienger
Do you have a "check_process" definition in commands.cfg ?

Re: How to monitor long running processes?

Posted: Wed Oct 10, 2018 1:39 am
by Siddharth Hegde
I have this in my command.cfg

Code: Select all

# 'check_process' command definition
define command{
        command_name    check_process
        command_line    $USER1$/check_procs -w $ARG1$ -c $ARG2$ -s $ARG3$
        }
Should I change this command to this?

Code: Select all

define command{
        command_name    check_process
        command_line   /usr/local/nagios/libexec/check_procs -c 1: -C $ARG1$ $ARG2$
        }

Re: How to monitor long running processes?

Posted: Wed Oct 10, 2018 2:44 pm
by cdienger
Has the nrpe agent been restarted on the remote machine since adding the check_process definition? What is returned if you run the followong on the Nagios system:

/usr/local/nagios/libexec/check_nrpe -H remote_host_ip -t 30 -c check_process

?

Re: How to monitor long running processes?

Posted: Thu Oct 11, 2018 1:21 am
by Siddharth Hegde
I get this result when I ran the command

Code: Select all

/usr/local/nagios/libexec/check_nrpe -H 10.x.x.x -t 30 -c check_process
PROCS OK: 1 process with command name 'java', args 'Zeus.jar' | procs=1;;1:5;0;
Thanks @npolovenko, @scottwilkerson and @cdienger. It is working now

Re: How to monitor long running processes?

Posted: Thu Oct 11, 2018 7:35 am
by scottwilkerson
Siddharth Hegde wrote:I get this result when I ran the command

Code: Select all

/usr/local/nagios/libexec/check_nrpe -H 10.x.x.x -t 30 -c check_process
PROCS OK: 1 process with command name 'java', args 'Zeus.jar' | procs=1;;1:5;0;
Thanks @npolovenko, @scottwilkerson and @cdienger. It is working now
Excellent! glad to hear it is working

Locking thread