[Nagiosplug-devel] [ nagiosplug-Bugs-1463369 ] check_ntp produce warning "Argument "(not parsed)" isn't num

SourceForge.net noreply at sourceforge.net
Mon Apr 3 00:40:11 CEST 2006


Bugs item #1463369, was opened at 2006-04-03 09:39
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1463369&group_id=29880

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: General plugin execution
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Herbert Straub (hstraub)
Assigned to: Nobody/Anonymous (nobody)
Summary: check_ntp produce warning "Argument "(not parsed)" isn't num

Initial Comment:
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

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1463369&group_id=29880




More information about the Devel mailing list