Timezone and notification timeperiods

Peter Gallagher gallagher.peter at gmail.com
Mon Aug 6 06:50:00 CEST 2012


== Nagios Core 3.3.1 ==

I'm running into an issue where notification emails are not being sent to
contacts at the time periods I would expect. Seemingly Nagios calculates
the notification period based on the underlying OS time rather than using
the timezone specified in nagios.cfg.

Curent timezone setup:
1. OS is set to timezone Australia/Brisbane
2. /etc/nagios/nagios.cfg is configured with "use_timezone=UTC"

Current timeperiod setup:
I have configured a series of timeperiods based on UTC for Brisbane, UK,
California etc. e.g.:

define timeperiod {
  alias                          UK Weekdays
  timeperiod_name                uk_weekdays
  monday                         08:00-18:00
  tuesday                        08:00-18:00
  wednesday                      08:00-18:00
  thursday                       08:00-18:00
  friday                         08:00-18:00
}

define timeperiod {
  alias                          Queensland Weekdays
  timeperiod_name                qld_weekdays
  sunday                         22:00-24:00
  monday                         00:00-07:00,22:00-24:00
  tuesday                        00:00-07:00,22:00-24:00
  wednesday                      00:00-07:00,22:00-24:00
  thursday                       00:00-07:00,22:00-24:00
  friday                         00:00-07:00
}

However Nagios is sending the notification emails to the wrong contacts by
calculating the notification period based on the OS time rather than using
the timezone value specified in nagios.cfg. For example if I change the OS
timezone to UTC then everything works as expected. The TZ environment
variable has not been set on the OS. Has anyone experienced a similar
issue? Or have I incorrectly configured something?

Thanks,

Peter
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/users/attachments/20120806/886fe583/attachment.html>
-------------- next part --------------
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
-------------- next part --------------
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null


More information about the Users mailing list