Changing timezone on Nagios Core Web Interface…


By default, the Nagios Core web interface (http://hostname/nagios) uses EDT. Nagios core itself uses the timezone defined by the system, unless the use_timezone variable is defined in nagios.cfg. The UI however functions with the timezone as defined by Apache/php. This is problem when you are running reports in the web interface and the times are all in EDT.

To get it to display UTC timezone instead (for example), do the following:

Open /etc/httpd/conf.d/nagios.conf

and add the line:

SetEnv TZ “UTC”

in the block:

<Directory “/usr/lib/nagios/cgi”>

</Directory>

Then perform a reload on Apache and Nagios. Then refresh the web interface and you’ll see the correct timezone.

 

-H

 

Resources:

http://scratching.psybermonkey.net/2011/04/nagios-time-within-nagios-is-incorrect.html

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: