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 #12257] Notification interval mistimed #4417

Closed
icinga-migration opened this issue Jul 29, 2016 · 5 comments

Comments

Projects
None yet
1 participant
@icinga-migration
Copy link
Member

commented Jul 29, 2016

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

Created by bsheqa on 2016-07-29 12:15:56 +00:00

Assignee: mfriedrich
Status: Resolved (closed on 2016-08-02 16:45:04 +00:00)
Target Version: 2.5.0
Last Update: 2016-08-02 16:45:04 +00:00 (in Redmine)

Icinga Version: v2.4.10-565-ga3815e4
Backport?: Not yet backported
Include in Changelog: 1

When setting an interval for a notification, the second notification (so the one after the regular notification) is sent out to fast. Heres some configuration I used to test this:

apply Service "notification dummy" {
  import "generic-service"

  check_command = "check_notification_dummy"
  check_interval = 60
  retry_interval = 60
  max_check_attempts = 3

  assign where host.name == "test-icinga-master3.test.netways.de"
}

apply Notification "notification-object-1" to Service {
  import "mail-service-notification"
  users = [ "bsheqa" ]
  interval = 120

  assign where true
}

[2016-07-29 14:09:37 +0200] information/Notification: Completed sending notification 'test-icinga-master3.test.netways.de!notification dummy!notification-object-1' for checkable 'test-icinga-master3.test.netways.de!notification dummy' and user 'bsheqa'.
[2016-07-29 14:10:05 +0200] information/Notification: Completed sending notification 'test-icinga-master3.test.netways.de!notification dummy!notification-object-1' for checkable 'test-icinga-master3.test.netways.de!notification dummy' and user 'bsheqa'.
[2016-07-29 14:12:10 +0200] information/Notification: Completed sending notification 'test-icinga-master3.test.netways.de!notification dummy!notification-object-1' for checkable 'test-icinga-master3.test.netways.de!notification dummy' and user 'bsheqa'.

Changesets

2016-08-02 16:41:01 +00:00 by mfriedrich 5498dc5

Fix that the first notification interval is incorrect

fixes #12257

Relations:

@icinga-migration

This comment has been minimized.

Copy link
Member Author

commented Jul 29, 2016

Updated by mfriedrich on 2016-07-29 14:46:11 +00:00

  • Category set to Notifications
  • Status changed from New to Assigned
  • Assigned to set to mfriedrich
  • Priority changed from Normal to High
  • Target Version set to 2.5.0
@icinga-migration

This comment has been minimized.

Copy link
Member Author

commented Aug 2, 2016

Updated by mfriedrich on 2016-08-02 13:30:05 +00:00

  • Relates set to 11170
@icinga-migration

This comment has been minimized.

Copy link
Member Author

commented Aug 2, 2016

Updated by mfriedrich on 2016-08-02 16:38:35 +00:00

5 secs window around all events (notification component)

Test Config

object Host "12257-host" {
  check_command = "dummy"
}

apply Service "12257-service" {

  check_command = "dummy"
  check_interval = 600
  retry_interval = 600
  max_check_attempts = 3

  assign where match("12257*", host.name)
}

object User "12257-user" {
  email = "michael.friedrich@netways.de"
}

apply Notification "12257-notification-service" to Service {
  import "mail-service-notification"

  users = [ "12257-user" ]

  interval = 120
  //interval = 0
  //times.begin = 60

  assign where match("12257*", host.name)
}

Test Cases

Bug

  1. On-Checkresult Event (OnNotificationRequested)

    [2016-08-02 17:44:58 +0200] information/Checkable: Checking for configured notifications for object '12257-host!12257-service'
    [2016-08-02 17:44:58 +0200] information/Notification: Sending notification '12257-host!12257-service!12257-notification-service' for user '12257-user'
    [2016-08-02 17:44:58 +0200] information/Notification: Completed sending notification '12257-host!12257-service!12257-notification-service' for checkable '12257-host!12257-service' and user '12257-user'.

    [2016-08-02 17:46:37 +0200] information/Notification: Sending notification '12257-host!12257-service!12257-notification-service' for user '12257-user'
    [2016-08-02 17:46:37 +0200] information/Notification: Completed sending notification '12257-host!12257-service!12257-notification-service' for checkable '12257-host!12257-service' and user '12257-user'.

    [2016-08-02 17:48:37 +0200] information/Notification: Sending notification '12257-host!12257-service!12257-notification-service' for user '12257-user'
    [2016-08-02 17:48:37 +0200] information/Notification: Completed sending notification '12257-host!12257-service!12257-notification-service' for checkable '12257-host!12257-service' and user '12257-user'.

    [2016-08-02 17:50:33 +0200] information/Checkable: Checkable '11686-host' does not have any notifications.
    [2016-08-02 17:50:37 +0200] information/Notification: Sending notification '12257-host!12257-service!12257-notification-service' for user '12257-user'
    [2016-08-02 17:50:37 +0200] information/Notification: Completed sending notification '12257-host!12257-service!12257-notification-service' for checkable '12257-host!12257-service' and user '12257-user'.

Fix

  1. On-Checkresult Event (OnNotificationRequested)

    [2016-08-02 18:10:26 +0200] information/Notification: Sending notification '12257-host!12257-service!12257-notification-service' for user '12257-user'
    [2016-08-02 18:10:26 +0200] information/Notification: Completed sending notification '12257-host!12257-service!12257-notification-service' for checkable '12257-host!12257-service' and user '12257-user'.

    [2016-08-02 18:12:27 +0200] information/Notification: Sending notification '12257-host!12257-service!12257-notification-service' for user '12257-user'
    [2016-08-02 18:12:27 +0200] information/Notification: Completed sending notification '12257-host!12257-service!12257-notification-service' for checkable '12257-host!12257-service' and user '12257-user'.

    [2016-08-02 18:14:27 +0200] information/Notification: Sending notification '12257-host!12257-service!12257-notification-service' for user '12257-user'
    [2016-08-02 18:14:27 +0200] information/Notification: Completed sending notification '12257-host!12257-service!12257-notification-service' for checkable '12257-host!12257-service' and user '12257-user'.

    [2016-08-02 18:16:27 +0200] information/Notification: Sending notification '12257-host!12257-service!12257-notification-service' for user '12257-user'
    [2016-08-02 18:16:27 +0200] information/Notification: Completed sending notification '12257-host!12257-service!12257-notification-service' for checkable '12257-host!12257-service' and user '12257-user'.

    [2016-08-02 18:18:27 +0200] information/Notification: Sending notification '12257-host!12257-service!12257-notification-service' for user '12257-user'
    [2016-08-02 18:18:27 +0200] information/Notification: Completed sending notification '12257-host!12257-service!12257-notification-service' for checkable '12257-host!12257-service' and user '12257-user'.

Fix and interval = 0 and times.begin = 60 -> first notification

[2016-08-02 18:26:16 +0200] information/ExternalCommandListener: Executing external command: [1470155176] PROCESS_SERVICE_CHECK_RESULT;12257-host;12257-service;1;dfdsdsd
[2016-08-02 18:26:16 +0200] information/Checkable: Checking for configured notifications for object '12257-host!12257-service'

[2016-08-02 18:27:19 +0200] information/Notification: Sending notification '12257-host!12257-service!12257-notification-service' for user '12257-user'
[2016-08-02 18:27:19 +0200] information/Notification: Completed sending notification '12257-host!12257-service!12257-notification-service' for checkable '12257-host!12257-service' and user '12257-user'.

-> no more notifications

Fix and interval = 0

[2016-08-02 18:30:41 +0200] information/ExternalCommandListener: Executing external command: [1470155441] PROCESS_SERVICE_CHECK_RESULT;12257-host;12257-service;1;ddss
[2016-08-02 18:30:41 +0200] information/Checkable: Checking for configured notifications for object '12257-host!12257-service'
[2016-08-02 18:30:41 +0200] information/Notification: Sending notification '12257-host!12257-service!12257-notification-service' for user '12257-user'
[2016-08-02 18:30:41 +0200] information/Notification: Completed sending notification '12257-host!12257-service!12257-notification-service' for checkable '12257-host!12257-service' and user '12257-user'.

-> no more notifications

@icinga-migration

This comment has been minimized.

Copy link
Member Author

commented Aug 2, 2016

Updated by mfriedrich on 2016-08-02 16:45:04 +00:00

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

Applied in changeset 5498dc5.

@icinga-migration

This comment has been minimized.

Copy link
Member Author

commented Aug 4, 2016

Updated by mfriedrich on 2016-08-04 15:32:29 +00:00

  • Relates set to 11095
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.