Page 1 of 1

check_ntp_peer truechimers option

Posted: Fri Mar 02, 2018 6:57 am
Dear support,

The manual page for check_ntp_peer (http://nagios-plugins.org/doc/man/check_ntp_peer.html) uses this example for truechimers:
Only check the number of usable time sources ("truechimers"):
./check_ntp_peer -H ntpserv -m @5 -n @3
I can't find this example with the at-sign and only one single integer in the Plugin Development Guidelines. https://nagios-plugins.org/doc/guidelin ... HOLDFORMAT

Our environment has 4 truechimers and while applying thresholds I stumble upon:
[root@nagiosxi libexec]# ./check_ntp_peer -H myntpserver -w 0.5 -c 0.7 -m @4 -n @3
NTP WARNING: Offset 0.00023 secs, truechimers=4 (WARNING)|offset=0.000230s;0.500000;0.700000; truechimers=4;4;3;0
When I use the syntax with an integer and a colon everything looks fine (except for the performance data for truechimers)
[root@nagiosxi libexec]# ./check_ntp_peer -H myntpserver -w 0.5 -c 0.7 -m 4: -n 3:
NTP OK: Offset 0.00023 secs, truechimers=4|offset=0.000230s;0.500000;0.700000; truechimers=4;0;0;0
[root@nagiosxi libexec]#
Is this the format I should be using? threshold warning = X - 1, critical = Y - 1
[root@nagiosxi libexec]# ./check_ntp_peer -H myntpserver -w 0.5 -c 0.7 -m @3 -n @2
NTP OK: Offset 0.000209 secs, truechimers=4|offset=0.000209s;0.500000;0.700000; truechimers=4;3;2;0
Could you please shine some light on the expected threshold format?

Thank you in advance. Jørgen

Re: check_ntp_peer truechimers option

Posted: Fri Mar 02, 2018 10:49 am
by scottwilkerson
[email protected] wrote:I can't find this example with the at-sign and only one single integer in the Plugin Development Guidelines. https://nagios-plugins.org/doc/guidelin ... HOLDFORMAT
Actually it's right there in the page
if range starts with "@", then alert if inside this range(inclusive of endpoints)
.....
@10:20 ≥ 10 and ≤ 20, (inside the range of {10 .. 20})
So normal threshold without the @ will warn when OUTSIDE the range, so when you add an @ you are warning INSIDE the range

if there is no : then the range is presumed to begin with 0

Re: check_ntp_peer truechimers option

Posted: Wed Mar 14, 2018 6:03 pm
Ok Scott, that's clear. Sorry for my late reply. One more thing.... I think in both cases performance data fields for warning and critical thresholds are wrong. They either show zero values or do show the proper value but with a : as suffix.

Options -m 4: -n 3: will result in truechimers=4;0;0;0 performance data. I expected truechimers=4;4:;3:;0 for both cases (at-sign thresholds and integer: thresholds) to show useful gauge dashlets in Nagios XI.

Can this be fixed in a future version of check_ntp_peer?

Regards, Jørgen

Re: check_ntp_peer truechimers option

Posted: Thu Mar 15, 2018 9:20 am
by scottwilkerson
Jørgen,

Best would be to create an issue with your finding/request at the plugins open source project:
https://github.com/nagios-plugins/nagios-plugins/issues