Command 'check_ntp_time' not defined

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
iwang
Posts: 41
Joined: Tue Nov 12, 2019 1:22 pm

Command 'check_ntp_time' not defined

Post 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
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Command 'check_ntp_time' not defined

Post 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
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
iwang
Posts: 41
Joined: Tue Nov 12, 2019 1:22 pm

Re: Command 'check_ntp_time' not defined

Post by iwang »

thanks. it worked!
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Command 'check_ntp_time' not defined

Post by scottwilkerson »

iwang wrote:thanks. it worked!
Great!

Locking thread
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
Locked