timezone and custom timeperiod

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
Alex_hha
Posts: 1
Joined: Sat Oct 25, 2014 10:04 am

timezone and custom timeperiod

Post by Alex_hha »

Hello,

I have encountered with strange behavior in nagios 3.5.1-1 (CentOS 7). I have setup use_timezone in nagios.cfg

Code: Select all

# cat /etc/nagios/nagios.cfg | grep use_timezone
use_timezone=US/Pacific
And I want to use with some hosts/services custom time period. Something like the following

Code: Select all

define timeperiod {
    timeperiod_name     wl_backup
    alias               Backup exception
    monday              00:00-02:00,02:30-24:00
    tuesday             00:00-02:00,02:30-24:00
    wednesday           00:00-02:00,02:30-24:00
    thursday            00:00-02:00,02:30-24:00
    friday              00:00-02:00,02:30-24:00
    saturday            00:00-02:00,02:30-24:00
    sunday              00:00-02:00,02:30-24:00
}

Code: Select all

define service {
    use                         local-service
    host_name                   www.example.net
    service_description         MySQL
    check_command               check_mysql!db_name!db_user!db_password
    check_period                wl_backup
    notification_interval       15
    notification_period         wl_backup
    notifications_enabled       1
    notification_options        c,u,r
    contact_groups              admins-by-email, admins-by-sms
}
With such settings timeperiod object using system timezone (UTC) and ignore use_timezone option. Is that normal or did I miss something?
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: timezone and custom timeperiod

Post by tmcdonald »

I thought I had seen a bug report for this a while back:

http://tracker.nagios.org/view.php?id=322

Does that sound like what you are experiencing? If so we might need to open an internal bug report for the issue and do some testing to speed things up. If we can reproduce this in-house it will be a lot easier to fix.
Former Nagios employee
Locked