How to monitor long running processes?

An open discussion forum for obtaining help with Nagios Core. Nagios Core users of all experience levels are welcome here. Subforum have been created for the discussion of Nagios Core and Nagios Plugin development.

NOTE: The SourceForge.net mailing lists have been deprecated in favor of this forum in order to expedite support and provide additional features not available on the old mailing list.

Re: How to monitor long running processes?

Postby Siddharth Hegde » Tue Oct 09, 2018 1:39 am

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

Re: How to monitor long running processes?

Postby cdienger » Tue Oct 09, 2018 10:55 am

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

Re: How to monitor long running processes?

Postby Siddharth Hegde » Wed Oct 10, 2018 1:39 am

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

Re: How to monitor long running processes?

Postby cdienger » Wed Oct 10, 2018 2:44 pm

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

Re: How to monitor long running processes?

Postby Siddharth Hegde » Thu Oct 11, 2018 1:21 am

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

Re: How to monitor long running processes?

Postby scottwilkerson » Thu Oct 11, 2018 7:35 am

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
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
User avatar
scottwilkerson
DevOps Engineer
 
Posts: 12656
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises

Previous

Return to Nagios Core

Who is online

Users browsing this forum: No registered users and 40 guests