How to monitor long running processes?

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.
Siddharth Hegde
Posts: 70
Joined: Mon Aug 07, 2017 4:19 am

Re: How to monitor long running processes?

Post 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?
User avatar
cdienger
Support Tech
Posts: 5045
Joined: Tue Feb 07, 2017 11:26 am

Re: How to monitor long running processes?

Post by cdienger »

Do you have a "check_process" definition in commands.cfg ?
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Siddharth Hegde
Posts: 70
Joined: Mon Aug 07, 2017 4:19 am

Re: How to monitor long running processes?

Post 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$
        }
User avatar
cdienger
Support Tech
Posts: 5045
Joined: Tue Feb 07, 2017 11:26 am

Re: How to monitor long running processes?

Post 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

?
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Siddharth Hegde
Posts: 70
Joined: Mon Aug 07, 2017 4:19 am

Re: How to monitor long running processes?

Post 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
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: How to monitor long running processes?

Post 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
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
Locked