-
Notifications
You must be signed in to change notification settings - Fork 328
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
check_ntp_time: NTP CRITICAL: Offset unknown #329
Comments
I have a question. Here -H is host address of time server or localhost? |
hi, I have the same problem all the time, in "random" mode:
|
Same Problem here. I Have a host which every now and than has the "offset unknown" critical, only to be ok in the next minutes again. |
Having the same problem on redhat 7. rh6 does not seem to have the problem and it only happens in one of our environments. It seems the li=3 (0xc0) is a special flag in the leap indicator that says the clock is unsynchronized. Why its unsynchronized is what I have been trying to sort through. A seemingly random machine reports NTP CRITICAL: Offset unknown for 15 or 20 minutes then goes back to normal. |
Similar here in Debian 7, it remains in failed state.
It only happens when querying a pfsense (FreeBSD 11.1) NTP server, some Windows ADS seems to be OK. Unsure about the li-flag, first query li=0 and second query li=3. Further querys timing out (or maybe discarded). |
There is an near duplicate issue in monitoring-plugins/monitoring-plugins#1142 |
We had the same issue in ubuntu14.04
Issue is repeating every few hours daily. |
Is there any updates for this issue? |
Hi @MarkYSA, The serverfault link mentions that if you need immediate resolution, you can try removing lines 254-257 and recompiling. In terms of an "official" solution, I don't see anyone else writing patches for this. I will most likely address this in the next nagios-plugins release, which I plan to do after the next Nagios Core release. |
@Madlohe when do you think there will be a patch for this? We are getting similar issues using this check in our env |
@espey We're looking at probably 5-6 weeks before I start on the next nagios-plugins release. |
@Madlohe - looks like there is something else to look at. The offset response is now formatted differently. Rather than being pure decimal, it is now has E-notation for some of the responses ` ` |
Hi @davidford365 - it looks like that message is formatted using %g, which will print in either standard or exponential notation "depending on what is appropriate". I don't have a rigorous definition for that last part, but the code for that hasn't changed recently. Are you able to show output from EDIT: I did manage to get an NTP server set up, but I haven't recreated the issue so far:
If anyone is able to reproduce consistently and can point me to a public NTP server that has the issue, I'm happy to debug the root cause. Otherwise, I'll probably just add an option to ignore the stratum check. |
A tcpdump indicates that too fast repetitive requests are not answered. A short wait of one second between requests solves this problem. Possibly the timeout should be increased accordingly. That works - the question remains whether that is the right solution. That would have to change:
Maybe you have to increase the timeout with -t or just increase the default timeout: |
@Gehirn-Mag-Net Thanks for investigating! If you look at @eskyuu's pull request to monitoring-plugins above, that looks like a pretty good solution to me. I'll be cherry-picking it into a PR for this repository if no one has any objections. |
check_ntp: add --allow-zero-stratum flag to resolve several commenters' issues on #329
Okay, I've merged 2 PRs which address the different issues discussed in this thread. If anyone's still having issues after compiling from maint, please let me know. |
Hi,
I am trying to monitor the ntp synchronization with check_ntp_time. But I am getting the error "NTP CRITICAL: Offset unknown". The plugin works well most of the time but sometimes the service check gets critical for some time on some hosts. I already recompiled the nagios-plugins and modified the check_ntp_time like suggested here: https://serverfault.com/questions/625027/nagios-check-ntp-time-offset-unknown
In the following output you can see the verbose output of the check command:
Thank you for your help!
Best regards,
Stefan
The text was updated successfully, but these errors were encountered: