{"action":"created","issue":{"url":"https://api.github.com/repos/Icinga/icinga2/issues/5261","repository_url":"https://api.github.com/repos/Icinga/icinga2","labels_url":"https://api.github.com/repos/Icinga/icinga2/issues/5261/labels{/name}","comments_url":"https://api.github.com/repos/Icinga/icinga2/issues/5261/comments","events_url":"https://api.github.com/repos/Icinga/icinga2/issues/5261/events","html_url":"https://github.com/Icinga/icinga2/issues/5261","id":228663297,"number":5261,"title":"Scheduled-Downtime over midnight will not be scheduled","user":{"login":"NRGYDrink","id":28703245,"avatar_url":"https://avatars3.githubusercontent.com/u/28703245?v=4","gravatar_id":"","url":"https://api.github.com/users/NRGYDrink","html_url":"https://github.com/NRGYDrink","followers_url":"https://api.github.com/users/NRGYDrink/followers","following_url":"https://api.github.com/users/NRGYDrink/following{/other_user}","gists_url":"https://api.github.com/users/NRGYDrink/gists{/gist_id}","starred_url":"https://api.github.com/users/NRGYDrink/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NRGYDrink/subscriptions","organizations_url":"https://api.github.com/users/NRGYDrink/orgs","repos_url":"https://api.github.com/users/NRGYDrink/repos","events_url":"https://api.github.com/users/NRGYDrink/events{/privacy}","received_events_url":"https://api.github.com/users/NRGYDrink/received_events","type":"User","site_admin":false},"labels":[{"id":54043337,"url":"https://api.github.com/repos/Icinga/icinga2/labels/bug","name":"bug","color":"fc2929","default":true},{"id":520053309,"url":"https://api.github.com/repos/Icinga/icinga2/labels/low-priority","name":"low-priority","color":"cc77ff","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2017-05-15T09:55:34Z","updated_at":"2018-04-25T08:59:12Z","closed_at":null,"author_association":"NONE","body":"## Behavior\r\n\r\nI have set a scheduled downtime before and after midnight but only the time before 00:00 will be scheduled.\r\n\r\n`vars.wiederkehrende_downtime= \"20:00-24:00,00:00-04:00\"`\r\n\r\nThere should be a downtime for 20:00-24:00 and 00:00-04:00 but only the downtime for 20:00-24:00 appears. Switching the times (\"00:00-04:00,20:00-24:00\") will still only accept the 20:00-24:00 downtime.\r\n\r\nMore info: https://monitoring-portal.org/index.php?thread/40408-scheduled-downtime-%C3%BCber-mitternacht-wird-nicht-eingerichtet/\r\n\r\n## Steps to Reproduce (for bugs)\r\n\r\n1. add to downtimes.conf:\r\n```\r\napply ScheduledDowntime \"wiederkehrende-downtime\" to Host {\r\ncomment = \"Wiederkehrende Downtime fuer Host\"\r\nauthor = \"icingaadmin\"\r\n ranges = {\r\n  monday = host.vars.wiederkehrende_downtime\r\n  tuesday = host.vars.wiederkehrende_downtime\r\n  wednesday = host.vars.wiederkehrende_downtime\r\n  thursday = host.vars.wiederkehrende_downtime\r\n  friday = host.vars.wiederkehrende_downtime\r\n  saturday = host.vars.wiederkehrende_downtime\r\n  sunday = host.vars.wiederkehrende_downtime\r\n }\r\n assign where host.vars.wiederkehrende_downtime != \"\"\r\n}\r\n```\r\n2. add to a host:\r\n`vars.wiederkehrende_downtime= \"20:00-24:00,00:00-04:00\"`\r\n3. _service icinga2 reload_\r\n4. check your GUI or \"_icinga2 object list --type downtime_\"\r\n\r\n## Context\r\n\r\nHow has this issue affected me? \r\nI cant set scheduled downtimes for daily/weekly backups so everytime the backup is running, icinga2 might not be able to check the host/service so it will send out alerts (sms) \r\n\r\n## My Environment\r\n\r\n_icinga2 --version_\r\n```\r\nicinga2 - The Icinga 2 network monitoring daemon (version: r2.6.3-1)\r\n\r\nCopyright (c) 2012-2017 Icinga Development Team (https://www.icinga.com/)\r\nLicense GPLv2+: GNU GPL version 2 or later <http://gnu.org/licenses/gpl2.html>\r\nThis is free software: you are free to change and redistribute it.\r\nThere is NO WARRANTY, to the extent permitted by law.\r\n\r\nApplication information:\r\n  Installation root: /usr\r\n  Sysconf directory: /etc\r\n  Run directory: /run\r\n  Local state directory: /var\r\n  Package data directory: /usr/share/icinga2\r\n  State path: /var/lib/icinga2/icinga2.state\r\n  Modified attributes path: /var/lib/icinga2/modified-attributes.conf\r\n  Objects path: /var/cache/icinga2/icinga2.debug\r\n  Vars path: /var/cache/icinga2/icinga2.vars\r\n  PID path: /run/icinga2/icinga2.pid\r\n\r\nSystem information:\r\n  Platform: Ubuntu\r\n  Platform version: 14.04.5 LTS, Trusty Tahr\r\n  Kernel: Linux\r\n  Kernel version: 4.4.0-66-generic\r\n  Architecture: x86_64\r\n\r\nBuild information:\r\n  Compiler: GNU 4.8.4\r\n  Build host: lgw01-43\r\n```\r\n\r\n_icinga2 feature list_\r\n```\r\nDisabled features: debuglog gelf graphite icingastatus influxdb livestatus opentsdb syslog\r\nEnabled features: api checker command compatlog ido-mysql mainlog notification perfdata statusdata\r\n```\r\n\r\n_icinga2 daemon -C_\r\n```\r\ninformation/cli: Icinga application loader (version: r2.6.3-1)\r\ninformation/cli: Loading configuration file(s).\r\ninformation/ConfigItem: Committing config item(s).\r\ninformation/ApiListener: My API identity: icinga2.domain.local\r\ninformation/ConfigItem: Instantiated 1 ApiUser.\r\ninformation/ConfigItem: Instantiated 1 ApiListener.\r\ninformation/ConfigItem: Instantiated 3 Zones.\r\ninformation/ConfigItem: Instantiated 1 FileLogger.\r\ninformation/ConfigItem: Instantiated 2 Endpoints.\r\ninformation/ConfigItem: Instantiated 6 NotificationCommands.\r\ninformation/ConfigItem: Instantiated 5120 Notifications.\r\ninformation/ConfigItem: Instantiated 210 CheckCommands.\r\ninformation/ConfigItem: Instantiated 33 Downtimes.\r\ninformation/ConfigItem: Instantiated 162 Hosts.\r\ninformation/ConfigItem: Instantiated 1 IcingaApplication.\r\ninformation/ConfigItem: Instantiated 15 HostGroups.\r\ninformation/ConfigItem: Instantiated 2 Comments.\r\ninformation/ConfigItem: Instantiated 55 Dependencies.\r\ninformation/ConfigItem: Instantiated 4 UserGroups.\r\ninformation/ConfigItem: Instantiated 8 Users.\r\ninformation/ConfigItem: Instantiated 1800 Services.\r\ninformation/ConfigItem: Instantiated 8 TimePeriods.\r\ninformation/ConfigItem: Instantiated 27 ServiceGroups.\r\ninformation/ConfigItem: Instantiated 20 ScheduledDowntimes.\r\ninformation/ConfigItem: Instantiated 1 CompatLogger.\r\ninformation/ConfigItem: Instantiated 1 StatusDataWriter.\r\ninformation/ConfigItem: Instantiated 2 ExternalCommandListeners.\r\ninformation/ConfigItem: Instantiated 1 CheckerComponent.\r\ninformation/ConfigItem: Instantiated 1 IdoMysqlConnection.\r\ninformation/ConfigItem: Instantiated 1 NotificationComponent.\r\ninformation/ConfigItem: Instantiated 1 PerfdataWriter.\r\ninformation/ScriptGlobal: Dumping variables to file '/var/cache/icinga2/icinga2.vars'\r\ninformation/cli: Finished validating the configuration file(s).\r\n```\r\n\r\n_icinga2 object list --type Endpoint_\r\n```\r\nObject 'icinga2-sat.domain.local' of type 'Endpoint':\r\n  % declared in '/etc/icinga2/zones.conf', lines 20:1-20:49\r\n  * __name = \"icinga2-sat.domain.local\"\r\n  * host = \"192.168.63.100\"\r\n    % = modified in '/etc/icinga2/zones.conf', lines 21:2-21:23\r\n  * log_duration = 86400\r\n  * name = \"icinga2-sat.domain.local\"\r\n  * package = \"_etc\"\r\n  * port = \"5665\"\r\n  * templates = [ \"icinga2-sat.domain.local\" ]\r\n    % = modified in '/etc/icinga2/zones.conf', lines 20:1-20:49\r\n  * type = \"Endpoint\"\r\n  * zone = \"\"\r\n\r\nObject 'icinga2.domain.local' of type 'Endpoint':\r\n  % declared in '/etc/icinga2/zones.conf', lines 10:1-10:40\r\n  * __name = \"icinga2.domain.local\"\r\n  * host = \"10.124.16.100\"\r\n    % = modified in '/etc/icinga2/zones.conf', lines 11:2-11:22\r\n  * log_duration = 86400\r\n  * name = \"icinga2.domain.local\"\r\n  * package = \"_etc\"\r\n  * port = \"5665\"\r\n    % = modified in '/etc/icinga2/zones.conf', lines 12:2-12:14\r\n  * templates = [ \"icinga2.domain.local\" ]\r\n    % = modified in '/etc/icinga2/zones.conf', lines 10:1-10:40\r\n  * type = \"Endpoint\"\r\n  * zone = \"\"\r\n\r\n```\r\n_icinga2 object list --type Zone_\r\n```\r\nObject 'global-templates' of type 'Zone':\r\n  % declared in '/etc/icinga2/zones.conf', lines 6:1-6:30\r\n  * __name = \"global-templates\"\r\n  * endpoints = null\r\n  * global = true\r\n    % = modified in '/etc/icinga2/zones.conf', lines 7:3-7:15\r\n  * name = \"global-templates\"\r\n  * package = \"_etc\"\r\n  * parent = \"\"\r\n  * templates = [ \"global-templates\" ]\r\n    % = modified in '/etc/icinga2/zones.conf', lines 6:1-6:30\r\n  * type = \"Zone\"\r\n  * zone = \"\"\r\n\r\nObject 'SAT' of type 'Zone':\r\n  % declared in '/etc/icinga2/zones.conf', lines 24:1-24:21\r\n  * __name = \"SAT\"\r\n  * endpoints = [ \"icinga2-sat.domain.local\" ]\r\n    % = modified in '/etc/icinga2/zones.conf', lines 25:2-25:50\r\n  * global = false\r\n  * name = \"SAT\"\r\n  * package = \"_etc\"\r\n  * parent = \"master\"\r\n    % = modified in '/etc/icinga2/zones.conf', lines 26:2-26:18\r\n  * templates = [ \"SAT\" ]\r\n    % = modified in '/etc/icinga2/zones.conf', lines 24:1-24:21\r\n  * type = \"Zone\"\r\n  * zone = \"\"\r\n\r\nObject 'master' of type 'Zone':\r\n  % declared in '/etc/icinga2/zones.conf', lines 15:1-15:20\r\n  * __name = \"master\"\r\n  * endpoints = [ \"icinga2.domain.local\" ]\r\n    % = modified in '/etc/icinga2/zones.conf', lines 17:2-17:41\r\n  * global = false\r\n  * name = \"master\"\r\n  * package = \"_etc\"\r\n  * parent = \"\"\r\n  * templates = [ \"master\" ]\r\n    % = modified in '/etc/icinga2/zones.conf', lines 15:1-15:20\r\n  * type = \"Zone\"\r\n  * zone = \"\"\r\n```"},"comment":{"url":"https://api.github.com/repos/Icinga/icinga2/issues/comments/384214476","html_url":"https://github.com/Icinga/icinga2/issues/5261#issuecomment-384214476","issue_url":"https://api.github.com/repos/Icinga/icinga2/issues/5261","id":384214476,"user":{"login":"Mikesch-mp","id":6574967,"avatar_url":"https://avatars1.githubusercontent.com/u/6574967?v=4","gravatar_id":"","url":"https://api.github.com/users/Mikesch-mp","html_url":"https://github.com/Mikesch-mp","followers_url":"https://api.github.com/users/Mikesch-mp/followers","following_url":"https://api.github.com/users/Mikesch-mp/following{/other_user}","gists_url":"https://api.github.com/users/Mikesch-mp/gists{/gist_id}","starred_url":"https://api.github.com/users/Mikesch-mp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Mikesch-mp/subscriptions","organizations_url":"https://api.github.com/users/Mikesch-mp/orgs","repos_url":"https://api.github.com/users/Mikesch-mp/repos","events_url":"https://api.github.com/users/Mikesch-mp/events{/privacy}","received_events_url":"https://api.github.com/users/Mikesch-mp/received_events","type":"User","site_admin":false},"created_at":"2018-04-25T08:59:12Z","updated_at":"2018-04-25T08:59:12Z","author_association":"CONTRIBUTOR","body":"My solution over midnight is like this\r\n```\r\nranges = {\r\n  \"monday\" = \"20:00-26:00\"\r\n}\r\n```\r\n\r\nin my scheduledDowntimes objects."}}
{"actor":{"display_login":"Mikesch-mp"}}