Nagios 2.5 wrong time displayed in web pages



I have Nagios 2.5 on OpenBSD 4.0 snapshot machine

Nagios weba pages always show GMT time, however my system time is in Asia/Tbilisi timezone, which is +4 hours.

Please advise me how to set Nagios to show local time.



You know what? I don’t know. Is the time on the box that runs apache correct?
type date in console.
How about apache web server? What time does it think it is?


date shows correct time and timezone
apache looks to think rright, as it’s log files show correct timestamps
nagios logfiles show GMT timestamps, and in the wepages it displays, for example:

Current Network Status
Last Updated: Mon Oct 9 13:33:59 GMT 2006
Updated every 90 seconds
Nagios® -
Logged in as nagiosadmin

It’s looks it’s supposed to show GMT, it’s no mistake there.


That’s gotta be something that is done during compile time. So, run ./configure and pay close attention to the output. Perhaps there is something there that will tip you off. Please use the url
localhost/server-status to see what apache returns for info about the time. You may have to modify your httpd.conf to allow that url. Just search for server-status with vi.


localhost/server-status shows a correct time:

Server Version: Apache/1.3.29 (Uni:evil: mod_ssl/2.8.16 OpenSSL/0.9.7j
Current Time: Monday, 09-Oct-2006 22:19:01 GET
Restart Time: Monday, 09-Oct-2006 22:18:54 GET

yes, i’m in Asia/Tbilisi.

Nagios has been installed from the package, so I can not recompile it rigiht now. I will check if rebuilding can help, if there is any option with ./configure to set Nagios to the local time, and if yes will download sources recompile it.

jakkedup, thanks a lot for your replies


it seems there is no option to force Nagios to work on local time during compilation.

Abyway, if enybody has Nagios running on the OpenBSD with the timezone other then GMT and nagios is displaying correct time, please confirm here.


Most likely it’s due to your package installation. If you installed from source, you wouldn’t have that problem, is my bet.


I’ve tried from the source. Need to tell you, it quite the same!
Thanks anyway.


I’m on OpenBSD 4.0 for sparc64 and I have the same problem.
If I run the CGI from a command line, date is the good one… but not in the browser when the page is provided by apache .
Before a deep inspection in the source code (I’m really a goat in programming) I would like to know if somebody has an idea about this.


If you are using Nagios 2.x the best would be to add the following to your Apache Virtual Host for Nagios:

SetEnv TZ “Asia/Tbilisi”

Hope this helps