Page 1 of 1
Nagios time zone
Posted: Wed May 22, 2013 6:47 am
by brom
Hi,
I need to use custom time zone inside nagios. I have configured "use_timezone" to use right value but notifications are still with system wide time zone. It seems that macros like $LONGDATETIME$ ignore "use_timezone".
Whether there some solution?
Re: Nagios time zone
Posted: Wed May 22, 2013 1:27 pm
by abrist
Is changing it system wide not possible in your environment?
Re: Nagios time zone
Posted: Wed May 22, 2013 2:29 pm
by brom
This will be a last measure. It will be better to solve this by nagios engine, if this possible of course.
Re: Nagios time zone
Posted: Wed May 22, 2013 3:44 pm
by abrist
I presume you have restarted nagios since the use_timezone directive change?
Re: Nagios time zone
Posted: Wed May 22, 2013 10:45 pm
by brom
Sure.
Re: Nagios time zone
Posted: Thu May 23, 2013 11:34 am
by sreinhardt
Have you also altered the apache configs to reflect the same timezone?
Code: Select all
<Directory>
...
SetEnv TZ "[Timezone]"
...
</Directory>
An apache restart will also be needed for this to take effect.
Re: Nagios time zone
Posted: Mon May 27, 2013 4:52 am
by brom
Both things webserver + "use_timezone" were configured from the outset.
Re: Nagios time zone
Posted: Tue May 28, 2013 2:32 pm
by sreinhardt
OK so we have both the nagios and apache timezones specifically set to the timezone that you would like, however the system time zone is not the same as either. Because of this you are finding that $LONGDATETIME$ doesn't correctly display the time, as it is referencing the local system time? Just to 100% verify, when you are getting the bad time, it is based of system not some arbitrary other time zone?
Re: Nagios time zone
Posted: Fri May 31, 2013 7:30 am
by brom
Hello,
right, $LONGDATETIME$ based on system time zone, in the same time I see correct time zone inside nagios admin area. I mean time zone based on nagios and apache timezones.
I have changed system time zone now, but will be perfect if some solution in the nagios engine is present.
Re: Nagios time zone
Posted: Mon Jun 03, 2013 11:09 am
by abrist
You may want to open a feature request/ bug report on
http://tracker.nagios.org