Page 1 of 2

Nagios XI Graph Timeline Shifted

PostPosted: Mon Oct 14, 2019 1:15 am
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.png
last check
last check.png (5.53 KiB) Viewed 1256 times


graph.png
graph

Re: Nagios XI Graph Timeline Shifted

PostPosted: Mon Oct 14, 2019 6:37 am
by scottwilkerson
If you go to Admin -> System Config -> System Profile -> View System Info

In the Date/Time section, do the 2 lines match?

Re: Nagios XI Graph Timeline Shifted

PostPosted: Wed Oct 16, 2019 2:49 am
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

Re: Nagios XI Graph Timeline Shifted

PostPosted: Wed Oct 16, 2019 6:27 am
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

Re: Nagios XI Graph Timeline Shifted

PostPosted: Tue Oct 22, 2019 7:30 am
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

Re: Nagios XI Graph Timeline Shifted

PostPosted: Tue Oct 22, 2019 8:19 am
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?

Re: Nagios XI Graph Timeline Shifted

PostPosted: Wed Oct 23, 2019 2:41 am
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)???

Re: Nagios XI Graph Timeline Shifted

PostPosted: Wed Oct 23, 2019 12:20 pm
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.

Re: Nagios XI Graph Timeline Shifted

PostPosted: Wed Oct 23, 2019 3:19 pm
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?

Re: Nagios XI Graph Timeline Shifted

PostPosted: Wed Oct 23, 2019 3:28 pm
by scottwilkerson
You can change the Nagios server timezone from
Admin -> System Settings -> Timezone