Page 1 of 1

check_ntp_time

Posted: Mon Dec 16, 2019 5:51 am
by Pratapa
Hi,

This is regarding NTP service. NTP service definition is using the command check_ntp_time command.

It's usage is

./check_ntp_time -H $HOST -w $WARN -c $CRIT

We are getting different results for different hosts.

For example host1

[nagiosserver]# ./check_ntp_time -H host1 -w 1 -c 5
CRITICAL: No response from NTP server

and for host2

nagiosserver]# ./check_ntp_time -H host2 -w 1 -c 5
NTP OK: Offset -6.794929504e-06 secs|offset=-0.000007s;1.000000;5.000000;

Showing correct results for host2

what needs to be configured on host1 to make it working for host1.

Re: check_ntp_time

Posted: Mon Dec 16, 2019 2:35 pm
by mbellerue
Maybe there is something blocking your Nagios server from communicating with host1? You can try this command,

Code: Select all

nmap -sU host1 -p 123
It should return that the port is open.

Re: check_ntp_time

Posted: Mon Dec 23, 2019 4:00 am
by Pratapa
I tried the command

nmap -sU host1 -p 123

Getting following error.

-bash: nmap: command not found

#which nmap
no nmap in (paths)

Please suggest

Re: check_ntp_time

Posted: Mon Dec 23, 2019 8:30 am
by scottwilkerson
You should be able to add the command with

Code: Select all

yum install nmap -y
then you can run the commands above