Check_NTP

Subhendu Ghosh sghosh at sghosh.org
Wed Oct 29 05:08:38 CET 2003


On Tue, 28 Oct 2003, Cook, Garry wrote:

> Nagios v1.1
> Plugins v1.3.1
> 
> I'm attempting to use the check_ntp plugin from the command line. When
> run, it gives the error 'Could not open ntpdate'. So I open up the
> check_ntp script and check it out, and I find what appears to be a
> placeholder 'PATH_TO_NTPDATE'. I changed this to '/usr/sbin/ntpdate' and
> now when I run the command I get this error:
> 
> Use of uninitialized value in concatenation (.) or string at ./check_ntp
> line 179.
> NTP OK: Offset -0.007811 secs
> 
> Line 179 lookl like:
> 
> If (!open (NTPDATE, "$utils::/usr/sbin/ntpdate -q $host 2>&1 |")) {
> 
> So, it appears as though the check is working now, although I am getting
> an error. I'm not sure if this error will cause Nagios to report the
> service as critical/not responding or something similar, but I'd like to
> be able to run it without errors regardless.
> 
> I've also run into the problem when I replace the ntpq placeholder later
> on in the script.
> 
> Can anyone recognize what might be wrong with line 179? 

Yes - when you installed the plugins (ran configure) you either did not 
have ntpdate and ntpdc installed or it was not in the path.  As a result 
the location of the binaries could not be found and check_ntp was not 
configured...

What should happen is that configure should find the binary (including the 
full path) and place that information in "utils.pm" not in the plugin 
itself.  Then the plugin gets the value of PATH_TO_NTPDATE from utils.pm


-- 

-sg



-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?   SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list