nagios 3.5.1 multiple timezones problem

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.
Locked
klajosh2
Posts: 38
Joined: Thu Jan 16, 2014 5:22 am

nagios 3.5.1 multiple timezones problem

Post by klajosh2 »

Hi All,

I am using nagios core 3.5.1 on a RedHat system with mod_gearman and pnp4nagios and livestatus module to monitor about 500 hosts and more than 2000 services.
We are using the thruk web interface as nagios front end. It works great. System is robust, very nice work.

But today my colleague asked me if we could adjust the reports of Nagios to his local timezone because the graphs and availability reports are a bit confusing for them.

The setup:

The main server is in GMT time zone but there are 2 mod_gearman pollers what are in different timezones, let's say: GMT + 5. How can I solve the above problem?
I found similar topic in the forum, but I did not understand the solution. Did anyone overcome this issue of multiple timezones but one central main nagios server?

A solution what come into my mind:
I can imagine to have another nagios (with different timezone settings (like GMT+5) where mod_gearman just feeds the check results back and this nagios can be used for reporting only, what do you think?
What problems does this "hack" raise?


Thanks for help,

klajosh
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: nagios 3.5.1 multiple timezones problem

Post by slansing »

Hmm, you raise an interesting point, do you have that old topic that we can take a look at? I'll take a look around and see if I can find it, if they had a solution there that would be a good place to start as I'm not quite sure how they would have gotten around the local Nagios system's timezone being used for all returned data.
klajosh2
Posts: 38
Joined: Thu Jan 16, 2014 5:22 am

Re: nagios 3.5.1 multiple timezones problem

Post by klajosh2 »

Hi,

thanks for getting back to me...

I found this topic: http://support.nagios.com/forum/viewtop ... 34&t=12290

Let me define my needs more precisely:

my monitoring systems are from the following components:

- nagios core 3.5.1
- livestatus
- pnp4nagios
- mod_gearman
- thruk frontend
- tons of plugins (self made and many more from the internet)

so as I wrote this problem came up only regarding reporting, since the time periods could be defined properly if you calculate the differences between timezones, sending notifications
are solved.

What I figured out (and please correct me if I am wrong) what could be a solution is just to change the timezone settings of the front end. (nagios web interface, in my case thruk).
So to have the ability to user per user basis to setup the timezone where he is sitting... Currently my colleague use the pnp4nagios graphs to report back the bandwidth usage
to the management... so what I did is to use another frontend drraw, with this he can access to the rrd databases only and create customised graphs. This frontend has the
ability to change the timezone setting... so I did and here we go, he has the proper timing on the graps with the data... I am not sure this is the proper way to do it... (that is why
I wrote it down with all the details). I am rookie user of drraw... there are few things what need to be figured out, but I do not know better solution yet...

Thanks for suggestions,

klajosh2
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: nagios 3.5.1 multiple timezones problem

Post by abrist »

Changing this on the frontend, is in fact, the only way to do so. The times are reported based on the timezone setting of core (which is immutable server side). When the client renders the page, the javascript should handle the translation. This can be problematic for things like pnp graphs which are generated by the server.
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.
klajosh2
Posts: 38
Joined: Thu Jan 16, 2014 5:22 am

Re: nagios 3.5.1 multiple timezones problem

Post by klajosh2 »

Is there any similar feature in Nagios XI ?
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: nagios 3.5.1 multiple timezones problem

Post by abrist »

We actually use highcharts for our graphs in XI. They will use the local time zone of the client when displaying the graphs.
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