Page 1 of 1

Command 'check_ntp_time' not defined

Posted: Tue Feb 25, 2020 6:00 pm
by iwang
Hi there is a service defined as:

Code: Select all

define service {
        host_name                       "<host list>"
        service_description             Check NTP Time with Rolex
        use                             xiwizard_nrpe_service
        display_name                    Check NTP Time with Rolex
        check_command                   check_nrpe!check_ntp_time!!!!!!!
        max_check_attempts              3
        check_interval                  1
        retry_interval                  1
        active_checks_enabled           1
        check_period                    xi_timeperiod_24x7
        notification_interval           60
        first_notification_delay        0
        notification_period             xi_timeperiod_24x7
        notification_options            w,c,u,r,f,s,
        notifications_enabled           1
        contact_groups                  P1_CRIT_NET,P2_WARN_NET
        _xiwizard                       linux-server
        register                        1
        }
we monitor all the hosts in the <host list> including the nagios server, but on nagios server, the service got alerts. check from commandline, it throw exceptions:

Code: Select all

$ /usr/local/nagios/libexec/check_nrpe -H  nagiosxi01 -t 60 -c check_ntp_time
NRPE: Command 'check_ntp_time' not defined
how to install this command on nagios server? check_ntp_time

Re: Command 'check_ntp_time' not defined

Posted: Wed Feb 26, 2020 8:09 am
by scottwilkerson
You would need to define the command in your /usr/local/nagios/etc/nrpe.cfg on the XI server like it is on your other servers and make sure you have the same plugin on the XI server

The, restart nrpe

Code: Select all

systemctl restart nrpe

Re: Command 'check_ntp_time' not defined

Posted: Wed Mar 04, 2020 12:09 am
by iwang
thanks. it worked!

Re: Command 'check_ntp_time' not defined

Posted: Wed Mar 04, 2020 7:49 am
by scottwilkerson
iwang wrote:thanks. it worked!
Great!

Locking thread