Page 3 of 5

Re: Memory Usage Linux

Posted: Thu Jun 13, 2013 10:53 am
by ofadl
define service{
use generic-service
host_name content.comtex.com
service_description Memory Usage
check_command check_nrpe!check_mem
}

Re: Memory Usage Linux

Posted: Thu Jun 13, 2013 1:12 pm
by slansing
It is just returning unknown? Hmm..

Lets run this, please replace the path as required, and please share the output of the command from the nagios server:

Code: Select all

/usr/local/nagios/libexec/check_nrpe -H <hostaddress> -C check_mem -w 30 -c 50
Is it possible you defined the check command's alias differently than check_mem?

Re: Memory Usage Linux

Posted: Thu Jun 13, 2013 1:20 pm
by ofadl
its giving me the no such file or directory, but i looked closer in the path /usr/local/nagios/libexec/check_nrpe, and check_nrpe isint even listed in that folder. How do i go about fixing that?

Re: Memory Usage Linux

Posted: Thu Jun 13, 2013 1:22 pm
by slansing
Right it may be different in your installation that's why I mentioned you may need to change the directory and point it to where check_nrpe resides currently. :)

Re: Memory Usage Linux

Posted: Thu Jun 13, 2013 1:38 pm
by ofadl
and after i find it where check_nrpe is, what am i suppose to do after?

Re: Memory Usage Linux

Posted: Thu Jun 13, 2013 1:48 pm
by ofadl
ok so i found it then ran:

/usr/lib/nagios/plugins$ /usr/lib/nagios/plugins/check_nrpe 209.114.36.166 -C check_mem -w 30 -c 50


What im getting there, is showing up on my nagios page. How do i fix this?

Re: Memory Usage Linux

Posted: Thu Jun 13, 2013 3:30 pm
by abrist
Could you clarify?
Are you still receiving errors in nagios? If so, what is the error?

Re: Memory Usage Linux

Posted: Thu Jun 13, 2013 3:47 pm
by ofadl
yes, its the same error. What im saying is the error explanation that is showing up on nagios, is the same explanation that is showing up when i run this :

/usr/lib/nagios/plugins/check_nrpe content.comtex.com -C check_mem -w 30 -c 50


and i get the output this:

/usr/lib/nagios/plugins/check_nrpe: invalid option -- 'C'
/usr/lib/nagios/plugins/check_nrpe: invalid option -- 'w'

NRPE Plugin for Nagios
Copyright (c) 1999-2008 Ethan Galstad (nagios@nagios.org)
Version: 2.12
Last Modified: 03-10-2008
License: GPL v2 with exemptions (-l for more info)
SSL/TLS Available: Anonymous DH Mode, OpenSSL 0.9.6 or higher required

Usage: check_nrpe -H <host> [-n] [-u] [-p <port>] [-t <timeout>] [-c <command>] [-a <arglist...>]

Options:
-n = Do no use SSL
-u = Make socket timeouts return an UNKNOWN state instead of CRITICAL
<host> = The address of the host running the NRPE daemon
[port] = The port on which the daemon is running (default=5666)
[timeout] = Number of seconds before connection times out (default=10)
[command] = The name of the command that the remote daemon should run
[arglist] = Optional arguments that should be passed to the command. Multiple
arguments should be separated by a space. If provided, this must be
the last option supplied on the command line.
-h,--help Print this short help.
-l,--license Print licensing information.
-n,--no-ssl Do not initial an ssl handshake with the server, talk in plaintext.

Note:
This plugin requires that you have the NRPE daemon running on the remote host.
You must also have configured the daemon to associate a specific plugin command
with the [command] option you are specifying here. Upon receipt of the
[command] argument, the NRPE daemon will run the appropriate plugin command and
send the plugin output and return code back to *this* plugin. This allows you
to execute plugins on remote hosts and 'fake' the results to make Nagios think
the plugin is being run locally.

Re: Memory Usage Linux

Posted: Thu Jun 13, 2013 3:57 pm
by slansing
Apologies try this one:

Code: Select all

/usr/lib/nagios/plugins/check_nrpe -H content.comtex.com -c check_mem
Are you sure that address will work? I'd recommend using the IP you use to SSH to that remote host.

Re: Memory Usage Linux

Posted: Thu Jun 13, 2013 3:59 pm
by ofadl
got it again :

Incorrect command line arguments supplied

NRPE Plugin for Nagios
Copyright (c) 1999-2008 Ethan Galstad (nagios@nagios.org)
Version: 2.12
Last Modified: 03-10-2008
License: GPL v2 with exemptions (-l for more info)
SSL/TLS Available: Anonymous DH Mode, OpenSSL 0.9.6 or higher required

Usage: check_nrpe -H <host> [-n] [-u] [-p <port>] [-t <timeout>] [-c <command>] [-a <arglist...>]

Options:
-n = Do no use SSL
-u = Make socket timeouts return an UNKNOWN state instead of CRITICAL
<host> = The address of the host running the NRPE daemon
[port] = The port on which the daemon is running (default=5666)
[timeout] = Number of seconds before connection times out (default=10)
[command] = The name of the command that the remote daemon should run
[arglist] = Optional arguments that should be passed to the command. Multiple
arguments should be separated by a space. If provided, this must be
the last option supplied on the command line.
-h,--help Print this short help.
-l,--license Print licensing information.
-n,--no-ssl Do not initial an ssl handshake with the server, talk in plaintext .

Note:
This plugin requires that you have the NRPE daemon running on the remote host.
You must also have configured the daemon to associate a specific plugin command
with the [command] option you are specifying here. Upon receipt of the
[command] argument, the NRPE daemon will run the appropriate plugin command and
send the plugin output and return code back to *this* plugin. This allows you
to execute plugins on remote hosts and 'fake' the results to make Nagios think
the plugin is being run locally.