NTP CRITICAL: Offset unknown

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
jbennett
Posts: 522
Joined: Mon Apr 16, 2012 3:00 pm

NTP CRITICAL: Offset unknown

Post by jbennett »

We have implemented an NTP sync check on all of the NRDS checks that we are rolling out right now.

I'm finding that a few locations will report critical in Nagios but the NTP sync appears to be just fine on the host.

Code: Select all

# ntpdc -p
     remote           local            st  poll reach  delay   offset    disp
=======================================================================
=LOCAL(0)        127.0.0.1       10   64  377 0.00000  0.000000 0.03061
*timeserver1     [host ip]          2   64  377 0.00000 11.053003 0.00580
I am seeing a number of people reporting this same issue and that it is a known bug in previous versions and should haev been fixed in 1.4.12?

Code: Select all

# ./check_ntp_time -V
check_ntp_time v2051 (nagios-plugins 1.4.13)
Is this still a known issue with this release?
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: NTP CRITICAL: Offset unknown

Post by abrist »

Can we see the full details and definition of the check? I am curious to what values you have specified in the check and the type of alerts you are receiving.
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
jbennett
Posts: 522
Joined: Mon Apr 16, 2012 3:00 pm

Re: NTP CRITICAL: Offset unknown

Post by jbennett »

This may have just been resolved with an update to the 1.4.16 plug-ins package.

The NTP warnings appear to have gone away for now. If they come up again, I will post.
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: NTP CRITICAL: Offset unknown

Post by slansing »

Great let us know how the update works out for you.
jbennett
Posts: 522
Joined: Mon Apr 16, 2012 3:00 pm

Re: NTP CRITICAL: Offset unknown

Post by jbennett »

Looks like it didn't resolve the issue:

When run on the host that's reporting Offset unknown in Nagios:

Code: Select all

# /usr/local/nagios/libexec/check_ntp_time -H localhost -w 0.5 -c 1
NTP OK: Offset -1.147855073e-07 secs|offset=-0.000000s;0.500000;1.000000;
Nagios shows:

Code: Select all

Check NTP Sync	
2m 27s
NTP CRITICAL: Offset unknown
It appears that NRDS has NOT pushed out the newer check routines that I have updated with the 1.4.16 plugins release.

On the Nagios box:

Code: Select all

# /usr/local/nagios/libexec/check_ntp_time -V
check_ntp_time v1.4.16 (nagios-plugins 1.4.16)
On the host:

Code: Select all

# /usr/local/nagios/libexec/check_ntp_time -V
check_ntp_time v2051 (nagios-plugins 1.4.13)
However, when I check the date of the service check on the host, it appears to have been touched today at about the time that I saved the NRDS config on the Nagios server:

Code: Select all

# ls -lh /usr/local/nagios/libexec/check_ntp_time
-rwxr-xr-x 1 nagios nagios 65K Jun 11 11:00 /usr/local/nagios/libexec/check_ntp_time
The nrds.cfg file was updated with the save of the config on the Nagios server, they both show version 8:

Code: Select all

 # ls -lh /usr/local/nrdp/clients/nrds/nrds.cfg
-rwxrwxr-x 1 nagios nagios 4.5K Jun 11 11:00 /usr/local/nrdp/clients/nrds/nrds.cfg
How can I force the updated plug-ins to be updated on the hosts? I'm hoping that this will resolve the issue if it's an actual bug with the check.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: NTP CRITICAL: Offset unknown

Post by scottwilkerson »

You will need to copy the plugins the the appropriate folder, likely

Code: Select all

/usr/local/nrdp/plugins/Linux/i386/
or

Code: Select all

/usr/local/nrdp/plugins/Linux/x86_64/

see page 3 of the following file on the order NRDS searches for plugins
http://assets.nagios.com/downloads/nagi ... h_NRDS.pdf

NRDS searches for the plugin in the following order (based on the CLIENTS operating system, Arch) and delivers the first match

Code: Select all

/usr/local/nrdp/plugins/$OS$/$ARCH$
/usr/local/nrdp/plugins/$OS$
/usr/local/nrdp/plugins/Generic/$ARCH$
/usr/local/nrdp/plugins/Generic
/usr/local/nagios/libexec
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
jbennett
Posts: 522
Joined: Mon Apr 16, 2012 3:00 pm

Re: NTP CRITICAL: Offset unknown

Post by jbennett »

I just copied the check_ntp* checks from the /usr/local/nagios/libexec/ directory to the /usr/local/nrdp/plugins/Linux/i386/ directory and now I'm getting 'Error code 126 - check plugin'.

On the clients:

Code: Select all

# uname -m
i686
On the Nagios server:

Code: Select all

# uname -m
x86_64
When I run the check from the i386 folder on the Nagios box, I get the following:

Code: Select all

# ./check_ntp_time -H xxx.xxx.xxx.xxx
NTP OK: Offset -26.2263124 secs|offset=-26.226312s;60.000000;120.000000;
When I run it on one of the clients, I get the following:

Code: Select all

:/usr/local/nagios/libexec # ls -lh check_ntp_time
-rwxr-xr-x 1 nagios nagios 141K Jun 12 07:59 check_ntp_time
:/usr/local/nagios/libexec # ./check_ntp_time
-bash: ./check_ntp_time: cannot execute binary file
I'm guessing that since I copied the files from the /libexec folder on my Nagios box into the i386 folder and then those files were pushed to a 32-bit system, that would be my problem.

How can I get the new check to be compiled to work for a 32-bit system?
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: NTP CRITICAL: Offset unknown

Post by abrist »

You will need to rebuild the nagios-plugins package on a 32 bit system, or set "export CFLAGS=-m32" on a 64 bit system before you build the package.
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
jbennett
Posts: 522
Joined: Mon Apr 16, 2012 3:00 pm

Re: NTP CRITICAL: Offset unknown

Post by jbennett »

Thanks.

That took care of the issue with compiling, but I'm still getting the offset unknown error. Everything came up ok initially, now I'mg getting locations with the offset unknown alert. :(

When I run it from the client command line, I get the error as well.

Code: Select all

# ./check_ntp_time -H localhost
NTP CRITICAL: Offset unknown|
# ./check_ntp_time -V
check_ntp_time v1.4.16 (nagios-plugins 1.4.16)
# ntpdc -p
     remote           local      st poll reach  delay   offset    disp
=======================================================================
=LOCAL(0)        127.0.0.1       10   64   17 0.00000  0.000000 0.96858
*timeserver1     xxx.xxx.xxx.xxx    2   64   17 0.00098  4.956048 0.00580
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: NTP CRITICAL: Offset unknown

Post by abrist »

What do get if you just run:

Code: Select all

ntpdc -p
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
Locked