[Pkg-nagios-devel] Bug#360549: check_ntp produce warning "Argument
"(not parsed)" isn't numeric"
Herbert Straub
herbert at linuxhacker.at
Mon Apr 3 07:09:11 UTC 2006
Package: nagios-plugins
Version: 1.4.2-5
Severity: normal
Nagios produce this warning status in the Webinterface:
**ePN /usr/lib/nagios/plugins/check_ntp: "Argument "(not parsed)"
isn't numeric in abs at (eval 13) line 401,".
If i called the check_ntp from the command line, i see this output:
/usr/lib/nagios/plugins/check_ntp -H myntphost -v
ntperr = 0
ntperr = 0
remote refid st t when poll reach delay offset jitter
No match!
==============================================================================
No match!
*111.111.111.111 193.49.205.17 2 u 140 1024 377 1.205
16.174 1.897
Candidate count= 1
match *111.111.111.111 193.49.205.17 2 u 140 1024 377 1.205
16.174 1.897
+111.111.111.112 193.49.205.17 2 u 960 1024 377 0.808
33.946 20.587
Candidate count= 2
No match!
+10.1.1.19 111.111.111.112 3 u 249 1024 376 19.528
-2.866 14.789
Candidate count= 3
No match!
Argument "(not parsed)" isn't numeric in abs at
/usr/lib/nagios/plugins/check_ntp line 401.
NTP OK: Offset -0.015000 secs, jitter (not parsed) msec, peer is
stratum 2|offset=-0.015000, jitter=0,peer_stratum=2
This patch fix the error:
diff -u /usr/lib/nagios/plugins/check_ntp.ORIG
/usr/lib/nagios/plugins/check_ntp
--- /usr/lib/nagios/plugins/check_ntp.ORIG 2006-04-03
08:47:49.000000000 +0200
+++ /usr/lib/nagios/plugins/check_ntp 2006-04-03 09:02:20.000000000 +0200
@@ -309,7 +309,6 @@
}
} else {
print "No match!\n" if $verbose;
- $jitter = '(not parsed)';
}
}
Command line Output:
/usr/lib/nagios/plugins/check_ntp -H myntphost
NTP OK: Offset -0.000868 secs, jitter 1.897 msec, peer is stratum
2|offset=-0.000868, jitter=0.001897,peer_stratum=2
Webinterface:
Status OK; Field: green
Details:
If the output line of ntpq not match, then the branch else {...
overwrite the previous value of $jitter with '(not parsed)'. I think
this line sould be dropped to work correctly.
Best Regards
Herbert Straub
More information about the Pkg-nagios-devel
mailing list