Nagios XI Graph Timeline Shifted

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
autorun
Posts: 9
Joined: Thu Aug 29, 2019 7:22 am

Nagios XI Graph Timeline Shifted

Post by autorun »

Hi,
There is a problem with service performance graph timeline.
The problem is that the timeline in the graph is shifted about 3 hours, for example if the service last check is at 16.30 then it will appear in the graph timeline at 19.30.
The service last check and next check info are correct in the service details view, but the problem is just in the graph.
In system settings the timezone is set to (UTC+00:00) UTC.
The Nagios XI version is (v5.6.6), I attached two pictures for service last check and the graph.

Thank you.
last check
last check
last check.png (5.53 KiB) Viewed 3351 times
graph
graph
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Nagios XI Graph Timeline Shifted

Post by scottwilkerson »

If you go to Admin -> System Config -> System Profile -> View System Info

In the Date/Time section, do the 2 lines match?
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
autorun
Posts: 9
Joined: Thu Aug 29, 2019 7:22 am

Re: Nagios XI Graph Timeline Shifted

Post by autorun »

Yes, they are the same.

PHP Timezone: UTC
PHP Time: Wed, 16 Oct 2019 11:49:07 +0000
System Time: Wed, 16 Oct 2019 11:49:07 +0000
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Nagios XI Graph Timeline Shifted

Post by scottwilkerson »

I see in the upper right of the graph there is a "reset zoom" button, this only appears if you have zoomed in on a graph, can you clock that button to make sure you haven't zoomed in to exclude the latest
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
autorun
Posts: 9
Joined: Thu Aug 29, 2019 7:22 am

Re: Nagios XI Graph Timeline Shifted

Post by autorun »

Hi @scottwilkerson,
The Zoom is just to show Minutes, but it didn't change the timeline.

You said "to make sure you haven't zoomed in to exclude the latest":
The latest time can't be excluded from the graph because it is greater than 16:11 (Not less).
*the latest time in this case according to Last Check is 16:11
*but the latest in the graph is 19:11
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Nagios XI Graph Timeline Shifted

Post by scottwilkerson »

The performance graphs show time relative to your browser as they are created in JS, are you also in (UTC+00:00) UTC?
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
autorun
Posts: 9
Joined: Thu Aug 29, 2019 7:22 am

Re: Nagios XI Graph Timeline Shifted

Post by autorun »

I'm using google chrome on windows 10 machine.
Here what I tried to do assuming the facts:

windows time is: 09:53
windows timezone (UTC +02:00) with daylight saving enabled
Nagios service last check: 09:50
Nagios timezone: (UTC+00:00) UTC

1. The last time filled with data in the graph is 12:50 (advanced 3 Hours from service last check 09:50)

2. I switched off window daylight saving => the windows time become 08:53 (decreased by One Hour), But the graph timeline did not change (still advanced 3 Hours from service last check).

3. I set windows timezone to: (UTC +00:00) Dublin, with daylight saving enabled => the windows time become 07:53, But the last graph time become 10:50 (advanced by 1 Hour from service last check).

4. I set windows timezone to: (UTC +00:00) Dublin, with No daylight saving => the windows time become 06:53, But the last graph time did not change, still 10:50 (still advanced by 1 Hour from service last check).

5. I set windows timezone to: (UTC +00:00) Monrovia, (it don't has daylight saving) => the windows time still 06:53 , But the last graph time become CORRECT 09:50 (equal to the last check time).

-----

So we can conclude from the above that graphs created in JS do NOT take daylight saving into consideration (Bug).
The reason why I set Nagios time zone to (UTC+00:00) UTC, is to make Nagios VM take the correct time from Hosting server.
And why Am I enforced to set my windows timezone to the same Nagios timezone to work (what about global users)???
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Nagios XI Graph Timeline Shifted

Post by scottwilkerson »

autorun wrote:So we can conclude from the above that graphs created in JS do NOT take daylight saving into consideration (Bug).
There were a few know issues with the version of Highcharts Nagios XI uses related to daylight savings time and a newer version is already slated to be included in Nagios XI 5.7.0 when it is release.

The decision to make graphs show in browser time was decided quite some time ago a result of numerous feature request.
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
autorun
Posts: 9
Joined: Thu Aug 29, 2019 7:22 am

Re: Nagios XI Graph Timeline Shifted

Post by autorun »

Hi,
So, what can I do for now for browser graph timeline to be match with Nagios server time?
As I said "The reason why I set Nagios timezone to (UTC+00:00) UTC, is to make Nagios VM take the correct time from Hosting server."
Can I use something else to set Nagios server timezone?
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Nagios XI Graph Timeline Shifted

Post by scottwilkerson »

You can change the Nagios server timezone from
Admin -> System Settings -> Timezone
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
Locked