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?
Nagios time zone
Re: Nagios time zone
Is changing it system wide not possible in your environment?
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.
"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.
Re: Nagios time zone
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
I presume you have restarted nagios since the use_timezone directive change?
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.
"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.
-
- -fno-stack-protector
- Posts: 4366
- Joined: Mon Nov 19, 2012 12:10 pm
Re: Nagios time zone
Have you also altered the apache configs to reflect the same timezone?
An apache restart will also be needed for this to take effect.
Code: Select all
<Directory>
...
SetEnv TZ "[Timezone]"
...
</Directory>
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.
Re: Nagios time zone
Both things webserver + "use_timezone" were configured from the outset.
-
- -fno-stack-protector
- Posts: 4366
- Joined: Mon Nov 19, 2012 12:10 pm
Re: Nagios time zone
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?
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.
Re: Nagios time zone
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.
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
You may want to open a feature request/ bug report on http://tracker.nagios.org
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.
"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.