Memory Usage Linux

Engage with the community of users including those using the open source solutions.
Includes Nagios Core, Plugins, and NCPA

Re: Memory Usage Linux

Postby ofadl » Thu Jun 13, 2013 10:53 am

define service{
use generic-service
host_name content.comtex.com
service_description Memory Usage
check_command check_nrpe!check_mem
}
ofadl
 
Posts: 201
Joined: Mon Jun 03, 2013 8:57 am

Re: Memory Usage Linux

Postby slansing » Thu Jun 13, 2013 1:12 pm

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?
slansing
 
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Memory Usage Linux

Postby ofadl » Thu Jun 13, 2013 1:20 pm

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?
ofadl
 
Posts: 201
Joined: Mon Jun 03, 2013 8:57 am

Re: Memory Usage Linux

Postby slansing » Thu Jun 13, 2013 1:22 pm

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. :)
slansing
 
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Memory Usage Linux

Postby ofadl » Thu Jun 13, 2013 1:38 pm

and after i find it where check_nrpe is, what am i suppose to do after?
ofadl
 
Posts: 201
Joined: Mon Jun 03, 2013 8:57 am

Re: Memory Usage Linux

Postby ofadl » Thu Jun 13, 2013 1:48 pm

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?
ofadl
 
Posts: 201
Joined: Mon Jun 03, 2013 8:57 am

Re: Memory Usage Linux

Postby abrist » Thu Jun 13, 2013 3:30 pm

Could you clarify?
Are you still receiving errors in nagios? If so, what is the error?
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
abrist
Red Shirt
 
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Memory Usage Linux

Postby ofadl » Thu Jun 13, 2013 3:47 pm

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.
ofadl
 
Posts: 201
Joined: Mon Jun 03, 2013 8:57 am

Re: Memory Usage Linux

Postby slansing » Thu Jun 13, 2013 3:57 pm

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.
slansing
 
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Memory Usage Linux

Postby ofadl » Thu Jun 13, 2013 3:59 pm

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.
ofadl
 
Posts: 201
Joined: Mon Jun 03, 2013 8:57 am

PreviousNext

Return to Community Support

Who is online

Users browsing this forum: No registered users and 71 guests