NRPE: Command 'check_ping' not defined

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
hema12
Posts: 5
Joined: Wed May 09, 2018 8:29 am

NRPE: Command 'check_ping' not defined

Post 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
npolovenko
Support Tech
Posts: 3457
Joined: Mon May 15, 2017 5:00 pm

Re: NRPE: Command 'check_ping' not defined

Post by npolovenko »

Hello, @hema12. Where are you seeing this error? Can you provide a screenshot? What tutorial did you use to install the nrpe?
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
hema12
Posts: 5
Joined: Wed May 09, 2018 8:29 am

Re: NRPE: Command 'check_ping' not defined

Post 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.
npolovenko
Support Tech
Posts: 3457
Joined: Mon May 15, 2017 5:00 pm

Re: NRPE: Command 'check_ping' not defined

Post 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:

Code: Select all

service nagios restart 
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Locked