Nagios XI Negative Durations

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
Smark
Posts: 32
Joined: Tue Jan 08, 2013 6:12 pm

Nagios XI Negative Durations

Post by Smark »

Hello,

As you can see in the below image I am seeing negative durations for some service checks.

Image

I've browsed the forums here and can provide the following information:

Admin > System Profile:

Code: Select all

System:

Nagios XI Version : 2012R2.9
[redacted] 2.6.32-431.11.2.el6.x86_64 x86_64
CentOS release 6.5 (Final)
Gnome is not installed
Apache Information

PHP Version: 5.3.3
Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/35.0.1916.99 Safari/537.36
Server Name: [redacted]: [redacted]
Server Port: 80
Date/Time

PHP Timezone: America/Phoenix 
PHP Time: Thu, 08 May 2014 12:48:18 -0700
System Time: Thu, 08 May 2014 12:48:18 -0700
/etc/php.ini:

Code: Select all

[Date]
; Defines the default timezone used by the date functions
; http://www.php.net/manual/en/datetime.configuration.php#ini.date.timezone
date.timezone = America/Phoenix
/etc/localtime:

Code: Select all

[root@xxxnagios01:~] ls -alh /etc/localtime
lrwxrwxrwx 1 root root 35 Apr 28 08:27 /etc/localtime -> /usr/share/zoneinfo/America/Phoenix
NTP Status:

Code: Select all

[root@xxxnagios01:~] service ntpd status
ntpd (pid  10412) is running...
NTP Config:

Code: Select all

server xxxntp01.[redacted]
server xxxntp02.[redacted]
server yyyntp01.[redacted]
The server is a VM running on VMware ESXi 5.5 Update 1 with the NTP service running pointed to those same three time servers.

Any idea how I can correct this?

Thank you for your time,
Smark
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Nagios XI Negative Durations

Post by abrist »

Maybe there is uncorrected clock skew:

Code: Select all

date
ntpdate xxxntp01.[redacted]
Is your browsers OS date correct?
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.
Smark
Posts: 32
Joined: Tue Jan 08, 2013 6:12 pm

Re: Nagios XI Negative Durations

Post by Smark »

Code: Select all

[root@xxxnagios01:~] service ntpd stop
Shutting down ntpd:                                        [  OK  ]
[root@xxxnagios01:~] date && ntpdate xxxntp01.[redacted]
Fri May  9 10:02:37 MST 2014
 9 May 10:02:37 ntpdate[11673]: adjust time server xxx.xxx.xxx.xxx offset -0.016526 sec
[root@xxxnagios01:~] service ntpd start
Starting ntpd:                                             [  OK  ]
The time above is within a second of matching my desktop's time. I assume the browser time is the same.
sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

Re: Nagios XI Negative Durations

Post by sreinhardt »

You might be running into one of several potential services being (re)started prior to an ntp update that would correct time. Such that when php\nagios\javascript gets the time from your nagios system and displays it in your browser, due to the applications time being off it is displayed strangely within your browser. Let's try restarting some of those key services and see how it reacts.

Code: Select all

service nagios stop
service ndo2db stop
service mysqld stop
service httpd restart
service mysqld start
service ndo2db start
service nagios start
Give it a few moments to schedule things normally, and check to see if the time is still skewed.
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
Smark
Posts: 32
Joined: Tue Jan 08, 2013 6:12 pm

Re: Nagios XI Negative Durations

Post by Smark »

Looks like it's fixed. I'm not getting any more negative durations and ndo2db was not running when I tried to stop it.

Thanks for all your help!
Smark
Posts: 32
Joined: Tue Jan 08, 2013 6:12 pm

Re: Nagios XI Negative Durations

Post by Smark »

I check back and am still experiencing the same issues that the sequenced restart fixed before. The breakage seems to be aligned with my upgrade to 2014R0.

Any ideas? I will try to post back tomorrow with additional details.
Smark
Posts: 32
Joined: Tue Jan 08, 2013 6:12 pm

Re: Nagios XI Negative Durations

Post by Smark »

It appears that the 2014R1.0 upgrade reverted the /etc/timezone link.

I'll make a note to change that back after an upgrade. It is currently fixed.

Can we leave this thread open until I verify that this is still functioning correctly after a week? I'll post back on June 5th.
Locked