Page 1 of 1
NRPE: Command 'check_ping' not defined
Posted: Fri May 11, 2018 1:25 am
by hema12
I am very new to nagios.
Can some one please help me to fix this issue.
I want to check remote client status like disk check, Cpu usage,Memory,ping etc.
Code: Select all
NRPE: Command 'check_ping' not defined
Re: NRPE: Command 'check_ping' not defined
Posted: Fri May 11, 2018 12:05 pm
by npolovenko
Hello,
@hema12. Where are you seeing this error? Can you provide a screenshot? What tutorial did you use to install the nrpe?
Re: NRPE: Command 'check_ping' not defined
Posted: Sun May 13, 2018 11:28 am
by hema12
@ npolovenko Thank you for your reply...
In my nagios server
localhost.cfg
Code: Select all
define host {
use linux-server
host_name apache
alias apache_test
address Ip address
max_check_attempts 5
check_period 24x7
notification_interval 30
notification_period 24x7
}
define service{
use local-service ; Name of service template to use
host_name apache
service_description PING
check_command check_ping!100.0,20%!500.0,60%
}
In remote nrpe.cfg
tried
1: command[check_ping]=/usr/local/nagios/libexec/check_ping -H $ARG1$ -w $ARG2$ -c $ARG3$ -p 5
2: command[check_ping]=/usr/local/nagios/libexec/check_ping -H ipaddress -w 100.0,20% -c 500.0,60% this is working from remote terminal
Where am i missing, please help I am very new to nagios.
Re: NRPE: Command 'check_ping' not defined
Posted: Mon May 14, 2018 4:46 pm
by npolovenko
@hema12, Check ping doesn't require the nrpe to run. You need to make sure that you have the check_nrpe command defined on the nagios server.
So add the following command to /etc/usr/local/nagios/etc/commands.cfg
Code: Select all
define command {
command_name check_ping
command_line $USER1$/check_ping -H $HOSTADDRESS$ -w $ARG1$ -c $ARG2$ -p 5
}
And then restart the nagios process with: