Search Exchange
Search All Sites
Nagios Live Webinars
Let our experts show you how Nagios can help your organization.Login
Directory Tree
check_ntpd
Meet The New Nagios Core Services Platform
Built on over 25 years of monitoring experience, the Nagios Core Services Platform provides insightful monitoring dashboards, time-saving monitoring wizards, and unmatched ease of use. Use it for free indefinitely.
Monitoring Made Magically Better
- Nagios Core on Overdrive
- Powerful Monitoring Dashboards
- Time-Saving Configuration Wizards
- Open Source Powered Monitoring On Steroids
- And So Much More!
This nagios check determines the health of NTPd on a system by calculating the overall health of the peers associated with the daemon. This check also verifies other attributes, such as the number of peers available, and whether a peer has been selected to be the sync source. The overall health percentage is a cumulative average of the reach over the peers.
Example: If 3 peers are listed, and 1 of the 3 dropped 2 of the last 8 packets, the health of that peer would be 75%, and the overall health would be about 92% ((100 + 100 + 75) / 3).
Available Options:
--critical|-c -Set the critical threshold for overall health (default:50)
--warning|-w -Set the warning threshold for overall health (default:75)
--peer_critical -Set the critical threshold for number of peers (default:1)
--peer_warning -Set the warning threshold for number of peers (default:2)
--help|-h -display this help
Example: If 3 peers are listed, and 1 of the 3 dropped 2 of the last 8 packets, the health of that peer would be 75%, and the overall health would be about 92% ((100 + 100 + 75) / 3).
Available Options:
--critical|-c
--warning|-w
--peer_critical
--peer_warning
--help|-h -display this help
Reviews (2)
bySoava, June 11, 2020
As described in the nagios guidlines (https://nagios-plugins.org/doc/guidelines.html#PLUGOUTPUT), pipe characters should only be used when defining performance data. Otherwise, it brakes the performance data and also the UI.
In this case, at line 146, I have replaced the "|" caracter with "/".
In this case, at line 146, I have replaced the "|" caracter with "/".
So far we have run across several of our servers that for whatever reason, never correctly connected with their NTP servers. The result was that ntpq -p returned "No Association" as its result which created a false positive since this script didn't recognize the failure case.
Added at line 36:
} elsif($server_list[$i] =~ /^No association/) {
splice(@server_list, $i, 1);
$i--;
to deal with this edge case
Added at line 36:
} elsif($server_list[$i] =~ /^No association/) {
splice(@server_list, $i, 1);
$i--;
to deal with this edge case
Owner's reply
Thanks! I've updated the plugin as you've suggested.