Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[dev.icinga.com #12549] Fixed downtimes scheduled for a future date trigger DOWNTIMESTART notifications #4566

Closed
icinga-migration opened this issue Aug 25, 2016 · 6 comments
Labels
area/notifications Notification events bug Something isn't working
Milestone

Comments

@icinga-migration
Copy link

This issue has been migrated from Redmine: https://dev.icinga.com/issues/12549

Created by elippmann on 2016-08-25 13:38:23 +00:00

Assignee: mfriedrich
Status: Resolved (closed on 2016-11-11 18:40:02 +00:00)
Target Version: 2.6.0
Last Update: 2016-11-11 18:40:02 +00:00 (in Redmine)

Icinga Version: 2.5.3
Backport?: Not yet backported
Include in Changelog: 1

When scheduling fixed downtimes, Icinga 2 immediately triggers DOWNTIMESTART notifications even if the state of the object is OK / UP and the downtime is scheduled for a future date. This is true for scheduled downtimes submitted via commands and downtimes from apply rules.

Changesets

2016-11-11 18:36:19 +00:00 by mfriedrich 1bfb91f

Ensure that DowntimeStart notifications are not immediately sent

fixes #12549

2016-11-16 10:27:59 +00:00 by mfriedrich e1e6d23

Ensure that DowntimeStart notifications are not immediately sent

fixes #12549

2016-11-16 10:35:18 +00:00 by mfriedrich 5947133

Ensure that DowntimeStart notifications are not immediately sent

fixes #12549

Relations:

@icinga-migration
Copy link
Author

Updated by elippmann on 2016-08-25 13:51:17 +00:00

apply Service "load" {
  import "generic-service"

  check_command = "load"

  /* Used by the ScheduledDowntime apply rule in `downtimes.conf`. */
  vars.backup_downtime = "02:00-03:00"

  assign where host.name == NodeName
}

apply ScheduledDowntime "backup-downtime" to Service {
  author = "icingaadmin"
  comment = "Scheduled downtime for backup"

  ranges = {
    monday = service.vars.backup_downtime
    tuesday = service.vars.backup_downtime
    wednesday = service.vars.backup_downtime
    thursday = service.vars.backup_downtime
    friday = service.vars.backup_downtime
    saturday = service.vars.backup_downtime
    sunday = service.vars.backup_downtime
  }

  assign where service.vars.backup_downtime != ""
}

***** Icinga  *****

Notification Type: DOWNTIMESTART

Service: load
Host: localhost.localdomain
Address: 127.0.0.1
State: OK

Date/Time: 2016-08-25 15:32:38 +0200

Additional Info: OK - load average: 0.00, 0.01, 0.05

Comment: [icingaadmin] Scheduled downtime for backup=

@icinga-migration
Copy link
Author

Updated by elippmann on 2016-08-25 14:45:40 +00:00

  • Subject changed from Fixed downtimes always trigger DOWNTIMESTART notifications even upon restarts to Fixed downtimes scheduled for a future date trigger DOWNTIMESTART notifications
  • Description updated

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2016-11-09 15:17:38 +00:00

  • Status changed from New to Assigned
  • Assigned to set to mfriedrich

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2016-11-11 18:31:57 +00:00

  • Target Version set to 2.6.0

As discussed, happening on each restart as well when OnDowntimeAdded is called inside Downtime::Start(). I've changed the way how fixed downtimes are started (by a timer) and added a new event just for that and corresponding notifications.

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2016-11-11 18:40:02 +00:00

  • Status changed from Assigned to Resolved
  • Done % changed from 0 to 100

Applied in changeset 1bfb91f.

@icinga-migration
Copy link
Author

Updated by mfrosch on 2016-12-08 15:51:01 +00:00

  • Relates set to 13489

@icinga-migration icinga-migration added bug Something isn't working area/notifications Notification events labels Jan 17, 2017
@icinga-migration icinga-migration added this to the 2.6.0 milestone Jan 17, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/notifications Notification events bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant