check_ntp_time

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
Pratapa
Posts: 144
Joined: Tue Oct 01, 2019 1:33 am

check_ntp_time

Post 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.
User avatar
mbellerue
Posts: 1403
Joined: Fri Jul 12, 2019 11:10 am

Re: check_ntp_time

Post 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.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
Pratapa
Posts: 144
Joined: Tue Oct 01, 2019 1:33 am

Re: check_ntp_time

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

Re: check_ntp_time

Post 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
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
Locked