Page 4 of 5
Re: Memory Usage Linux
Posted: Thu Jun 13, 2013 4:19 pm
by slansing
The above should be correct, it should at least tell you if the command on the other end is incorrectly defined.
Re: Memory Usage Linux
Posted: Thu Jun 13, 2013 5:56 pm
by ofadl
so any idea of what to do next??
Re: Memory Usage Linux
Posted: Fri Jun 14, 2013 12:18 pm
by abrist
Just to verify, the remote host's nrpe.cfg contains the command:
Code: Select all
command[check_mem]=/usr/lib/nagios/plugins/check_mem.sh 85 95
And the check that you are attempting from the nagios server is:
Code: Select all
/usr/lib/nagios/plugins/check_nrpe -H content.comtex.com -c check_mem
Correct?
Have you edited any of these files through filezilla/windows text editors?
Re: Memory Usage Linux
Posted: Fri Jun 14, 2013 12:43 pm
by ofadl
ok so, the path in the remote host's nrpe.cfg was defining a different path then the one that was suppsoe to be listed, i changed it this
command[check_mem]=/usr/lib/nagios/plugins/check_mem.sh 85 95
the check im running on then nagios server like you told me the :
/usr/lib/nagios/plugins/check_nrpe -H content.comtex.com -c check_mem
is returning :
OK - Memory usage is 9.700% (199832)
i restarted the nrpe servero n the remote host, and restarted nagios on the nagios server, but im still getting the same error
Re: Memory Usage Linux
Posted: Fri Jun 14, 2013 12:58 pm
by abrist
ofadl wrote:OK - Memory usage is 9.700% (199832)
Well the check is now working from the cli. Can we see your service check definition and command definition from the nagios server configs one last time?
Re: Memory Usage Linux
Posted: Fri Jun 14, 2013 2:15 pm
by ofadl
service definition located in:
/etc/nagios3/objects/
located in my linux.cfg file is the service defintion:
service definiton:
define service{
use generic-service
host_name content.comtex.com
service_description Memory Usage
check_command check_nrpe!check_mem
}
check_nrpe command is located in
/usr/lib/nagios/plugins/check_nrpe
Re: Memory Usage Linux
Posted: Mon Jun 17, 2013 1:02 pm
by abrist
Do you have a command definition for check_nrpe on the nagios server, if so, can you post it?
Re: Memory Usage Linux
Posted: Tue Jun 18, 2013 8:42 am
by ofadl
im not sure, like i stated before, i followed what this guide told me, and did nothing more :
http://www.ericmichaelstone.com/?p=3652
Re: Memory Usage Linux
Posted: Tue Jun 18, 2013 8:51 am
by ofadl
i went over the nrpe documentation again, and realized i forgot to define a check_nrpe command definition so i defined one in
/usr/local/nagios/etc/objects and in the commands.cfg file i added
define command{
command_name check_nrpe
command_line $USER1$/check_nrpe -H $HOSTADDRESS$ -c $ARG1$
}
but its still giving me the same error on nagios website
Re: Memory Usage Linux
Posted: Tue Jun 18, 2013 9:21 am
by ofadl
wow this is really confusing haha, so i was just looking around and in my:
/etc/nagios-plugins/config
i found a file for check_nrpe.cfg and in it has these two definitions
# this command runs a program $ARG1$ with arguments $ARG2$
define command {
command_name check_nrpe
command_line /usr/lib/nagios/plugins/check_nrpe -H $HOSTADDRESS$ -c $ARG1$ -a $ARG2$
}
# this command runs a program $ARG1$ with no arguments
define command {
command_name check_nrpe_1arg
command_line /usr/lib/nagios/plugins/check_nrpe -H $HOSTADDRESS$ -c $ARG1$
}