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 #11589] notification sent out during flexible downtime #4120

Closed
icinga-migration opened this issue Apr 14, 2016 · 7 comments

Comments

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

commented Apr 14, 2016

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

Created by mnardin on 2016-04-14 08:19:43 +00:00

Assignee: gbeutner
Status: Resolved (closed on 2016-05-11 12:13:58 +00:00)
Target Version: 2.4.8
Last Update: 2016-08-08 11:21:01 +00:00 (in Redmine)

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

Hi,
we create Downtime objects through the api.

[2016-04-14 00:01:02 +0200] notice/ApiListener: Received update for object: {"config":"object Downtime \"icingam01-p-1460584862-3\" ignore_on_error {\n\tauthor = \"unarm\"\n\tcomment = \"DOWNTIME_API\"\n\tconfig_owner = \"\"\n\tduration = 2700.000000\n\tend_time = 1460604600.000000\n\tfixed = false\n\thost_name = \"http01-p\"\n\tscheduled_by = \"\"\n\tservice_name = \"http-status\"\n\tstart_time = 1460597400.000000\n\ttriggered_by = \"\"\n\tversion = 1460584862.856535\n}\n","modified_attributes":{},"name":"http01-p!http-status!icingam01-p-1460584862-3","original_attributes":[],"type":"Downtime","version":1460584862.8565349579}
[2016-04-14 00:01:02 +0200] notice/ApiListener: Received update for object: {"config":"object Downtime \"icingam01-p-1460584862-4\" ignore_on_error {\n\tauthor = \"unarm\"\n\tcomment = \"DOWNTIME_API\"\n\tconfig_owner = \"\"\n\tduration = 2700.000000\n\tend_time = 1460604600.000000\n\tfixed = false\n\thost_name = \"http02-p\"\n\tscheduled_by = \"\"\n\tservice_name = \"http-status\"\n\tstart_time = 1460597400.000000\n\ttriggered_by = \"\"\n\tversion = 1460584862.938301\n}\n","modified_attributes":{},"name":"http02-p!http-status!icingam01-p-1460584862-4","original_attributes":[],"type":"Downtime","version":1460584862.9383010864}
[2016-04-14 00:01:03 +0200] debug/IdoMysqlConnection: Query: INSERT INTO icinga_scheduleddowntime (author_name, comment_data, downtime_type, duration, endpoint_object_id, entry_time, instance_id, internal_downtime_id, is_fixed, is_in_effect, name, object_id, scheduled_end_time, scheduled_start_time, was_started) VALUES ('unarm', 'DOWNTIME_API', '1', '2700', 5, FROM_UNIXTIME(1460584862), 1, '18', '0', '0', 'http01-p!http-status!icingam01-p-1460584862-3', 11889, FROM_UNIXTIME(1460604600), FROM_UNIXTIME(1460597400), '0')
[2016-04-14 00:01:03 +0200] debug/IdoMysqlConnection: Query: INSERT INTO icinga_downtimehistory (author_name, comment_data, downtime_type, duration, endpoint_object_id, entry_time, instance_id, internal_downtime_id, is_fixed, is_in_effect, name, object_id, scheduled_end_time, scheduled_start_time, was_started) VALUES ('unarm', 'DOWNTIME_API', '1', '2700', 5, FROM_UNIXTIME(1460584862), 1, '18', '0', '0', 'http01-p!http-status!icingam01-p-1460584862-3', 11889, FROM_UNIXTIME(1460604600), FROM_UNIXTIME(1460597400), '0')
[2016-04-14 00:01:03 +0200] debug/IdoMysqlConnection: Query: INSERT INTO icinga_scheduleddowntime (author_name, comment_data, downtime_type, duration, endpoint_object_id, entry_time, instance_id, internal_downtime_id, is_fixed, is_in_effect, name, object_id, scheduled_end_time, scheduled_start_time, was_started) VALUES ('unarm', 'DOWNTIME_API', '1', '2700', 5, FROM_UNIXTIME(1460584862), 1, '19', '0', '0', 'http02-p!http-status!icingam01-p-1460584862-4', 11892, FROM_UNIXTIME(1460604600), FROM_UNIXTIME(1460597400), '0')
[2016-04-14 00:01:03 +0200] debug/IdoMysqlConnection: Query: INSERT INTO icinga_downtimehistory (author_name, comment_data, downtime_type, duration, endpoint_object_id, entry_time, instance_id, internal_downtime_id, is_fixed, is_in_effect, name, object_id, scheduled_end_time, scheduled_start_time, was_started) VALUES ('unarm', 'DOWNTIME_API', '1', '2700', 5, FROM_UNIXTIME(1460584862), 1, '19', '0', '0', 'http02-p!http-status!icingam01-p-1460584862-4', 11892, FROM_UNIXTIME(1460604600), FROM_UNIXTIME(1460597400), '0')

These are the only lines that I've found grepping for the downtime name in the debug.log.

These are the relevant lines for the object 'http01-p!http-status'

[2016-04-14 04:05:39 +0200] notice/Downtime: Triggering downtime 'http01-p!http-status!icingam01-p-1460584862-3'.
[2016-04-14 04:05:39 +0200] debug/DbEvents: add log entry history for 'http01-p!http-status'
[2016-04-14 04:05:39 +0200] debug/DbEvents: add log entry history for 'http01-p!http-status'
[2016-04-14 04:05:39 +0200] debug/DbEvents: add state change history for 'http01-p!http-status'
[2016-04-14 04:05:39 +0200] notice/Checkable: State Change: Checkable http01-p!http-status soft state change from OK to CRITICAL detected.
[2016-04-14 04:08:39 +0200] notice/Downtime: Triggering downtime 'http01-p!http-status!icingam01-p-1460584862-3'.
[2016-04-14 04:08:39 +0200] debug/DbEvents: add log entry history for 'http01-p!http-status'
[2016-04-14 04:08:39 +0200] debug/DbEvents: add log entry history for 'http01-p!http-status'
[2016-04-14 04:09:39 +0200] notice/Downtime: Triggering downtime 'http01-p!http-status!icingam01-p-1460584862-3'.
[2016-04-14 04:09:39 +0200] debug/DbEvents: add log entry history for 'http01-p!http-status'
[2016-04-14 04:09:39 +0200] debug/DbEvents: add log entry history for 'http01-p!http-status'
[2016-04-14 04:10:39 +0200] notice/Downtime: Triggering downtime 'http01-p!http-status!icingam01-p-1460584862-3'.
[2016-04-14 04:10:39 +0200] debug/DbEvents: add log entry history for 'http01-p!http-status'
[2016-04-14 04:10:39 +0200] debug/DbEvents: add log entry history for 'http01-p!http-status'
[2016-04-14 04:10:39 +0200] debug/DbEvents: add state change history for 'http01-p!http-status'
[2016-04-14 04:10:39 +0200] notice/Checkable: State Change: Checkable http01-p!http-status hard state change from CRITICAL to CRITICAL detected.
[2016-04-14 04:10:39 +0200] information/Checkable: Checking for configured notifications for object 'http01-p!http-status'
[2016-04-14 04:10:39 +0200] debug/Checkable: Checkable 'http01-p!http-status' has 1 notification(s).
[2016-04-14 04:10:39 +0200] notice/Notification: Attempting to send notifications for notification object 'http01-p!http-status!mail-to-unarm-prod-server'.
[2016-04-14 04:10:39 +0200] information/Notification: Sending notification 'http01-p!http-status!mail-to-unarm-prod-server' for user 'unarm'
[2016-04-14 04:10:39 +0200] debug/DbEvents: add notification history for 'http01-p!http-status'
[2016-04-14 04:10:39 +0200] debug/DbEvents: add contact notification history for service 'http01-p!http-status' and user 'unarm'.
[2016-04-14 04:10:39 +0200] debug/DbEvents: add log entry history for 'http01-p!http-status'
[2016-04-14 04:10:39 +0200] information/Notification: Completed sending notification 'http01-p!http-status!mail-to-unarm-prod-server' for checkable 'http01-p!http-status'
[2016-04-14 04:12:09 +0200] notice/Downtime: Triggering downtime 'http01-p!http-status!icingam01-p-1460584862-3'.
[2016-04-14 04:12:09 +0200] debug/DbEvents: add log entry history for 'http01-p!http-status'
[2016-04-14 04:14:39 +0200] notice/Downtime: Triggering downtime 'http01-p!http-status!icingam01-p-1460584862-3'.
[2016-04-14 04:14:39 +0200] debug/DbEvents: add log entry history for 'http01-p!http-status'
[2016-04-14 04:17:39 +0200] notice/Downtime: Triggering downtime 'http01-p!http-status!icingam01-p-1460584862-3'.
[2016-04-14 04:17:39 +0200] debug/DbEvents: add log entry history for 'http01-p!http-status'
[2016-04-14 04:20:39 +0200] notice/Downtime: Triggering downtime 'http01-p!http-status!icingam01-p-1460584862-3'.
[2016-04-14 04:20:39 +0200] debug/DbEvents: add log entry history for 'http01-p!http-status'
[2016-04-14 04:23:39 +0200] notice/Downtime: Triggering downtime 'http01-p!http-status!icingam01-p-1460584862-3'.
[2016-04-14 04:23:39 +0200] debug/DbEvents: add log entry history for 'http01-p!http-status'
[2016-04-14 04:26:39 +0200] notice/Downtime: Triggering downtime 'http01-p!http-status!icingam01-p-1460584862-3'.
[2016-04-14 04:26:39 +0200] debug/DbEvents: add log entry history for 'http01-p!http-status'
[2016-04-14 04:29:39 +0200] debug/DbEvents: add log entry history for 'http01-p!http-status'
[2016-04-14 04:29:39 +0200] debug/DbEvents: add state change history for 'http01-p!http-status'
[2016-04-14 04:29:39 +0200] notice/Checkable: State Change: Checkable http01-p!http-status hard state change from CRITICAL to OK detected.
[2016-04-14 04:29:39 +0200] information/Checkable: Checking for configured notifications for object 'http01-p!http-status'
[2016-04-14 04:29:39 +0200] debug/Checkable: Checkable 'http01-p!http-status' has 1 notification(s).
[2016-04-14 04:29:39 +0200] notice/Notification: Attempting to send notifications for notification object 'http01-p!http-status!mail-to-unarm-prod-server'.
[2016-04-14 04:29:39 +0200] information/Notification: Sending notification 'http01-p!http-status!mail-to-unarm-prod-server' for user 'unarm'
[2016-04-14 04:29:39 +0200] debug/DbEvents: add notification history for 'http01-p!http-status'
[2016-04-14 04:29:39 +0200] debug/DbEvents: add contact notification history for service 'http01-p!http-status' and user 'unarm'.
[2016-04-14 04:29:39 +0200] debug/DbEvents: add log entry history for 'http01-p!http-status'
[2016-04-14 04:29:39 +0200] information/Notification: Completed sending notification 'http01-p!http-status!mail-to-unarm-prod-server' for checkable 'http01-p!http-status'
[2016-04-14 04:32:39 +0200] notice/Downtime: Triggering downtime 'http01-p!http-status!icingam01-p-1460584862-3'.
[2016-04-14 04:32:39 +0200] debug/DbEvents: add log entry history for 'http01-p!http-status'
[2016-04-14 04:32:39 +0200] debug/DbEvents: add log entry history for 'http01-p!http-status'
[2016-04-14 04:32:39 +0200] debug/DbEvents: add state change history for 'http01-p!http-status'
[2016-04-14 04:32:39 +0200] notice/Checkable: State Change: Checkable http01-p!http-status soft state change from OK to CRITICAL detected.
[2016-04-14 04:35:39 +0200] notice/Downtime: Triggering downtime 'http01-p!http-status!icingam01-p-1460584862-3'.
[2016-04-14 04:35:39 +0200] debug/DbEvents: add log entry history for 'http01-p!http-status'
[2016-04-14 04:35:39 +0200] debug/DbEvents: add log entry history for 'http01-p!http-status'
[2016-04-14 04:36:39 +0200] notice/Downtime: Triggering downtime 'http01-p!http-status!icingam01-p-1460584862-3'.
[2016-04-14 04:36:39 +0200] debug/DbEvents: add log entry history for 'http01-p!http-status'
[2016-04-14 04:36:39 +0200] debug/DbEvents: add log entry history for 'http01-p!http-status'
[2016-04-14 04:37:39 +0200] notice/Downtime: Triggering downtime 'http01-p!http-status!icingam01-p-1460584862-3'.
[2016-04-14 04:37:39 +0200] debug/DbEvents: add log entry history for 'http01-p!http-status'
[2016-04-14 04:37:39 +0200] debug/DbEvents: add log entry history for 'http01-p!http-status'
[2016-04-14 04:37:39 +0200] debug/DbEvents: add state change history for 'http01-p!http-status'
[2016-04-14 04:37:39 +0200] notice/Checkable: State Change: Checkable http01-p!http-status hard state change from CRITICAL to CRITICAL detected.
[2016-04-14 04:37:39 +0200] information/Checkable: Checking for configured notifications for object 'http01-p!http-status'
[2016-04-14 04:37:39 +0200] debug/Checkable: Checkable 'http01-p!http-status' has 1 notification(s).
[2016-04-14 04:37:39 +0200] notice/Notification: Attempting to send notifications for notification object 'http01-p!http-status!mail-to-unarm-prod-server'.
[2016-04-14 04:37:39 +0200] information/Notification: Sending notification 'http01-p!http-status!mail-to-unarm-prod-server' for user 'unarm'
[2016-04-14 04:37:39 +0200] debug/DbEvents: add notification history for 'http01-p!http-status'
[2016-04-14 04:37:39 +0200] debug/DbEvents: add contact notification history for service 'http01-p!http-status' and user 'unarm'.
[2016-04-14 04:37:39 +0200] debug/DbEvents: add log entry history for 'http01-p!http-status'
[2016-04-14 04:37:39 +0200] information/Notification: Completed sending notification 'http01-p!http-status!mail-to-unarm-prod-server' for checkable 'http01-p!http-status'
[2016-04-14 04:38:39 +0200] notice/Downtime: Triggering downtime 'http01-p!http-status!icingam01-p-1460584862-3'.
[2016-04-14 04:38:39 +0200] debug/DbEvents: add log entry history for 'http01-p!http-status'
[2016-04-14 04:41:39 +0200] notice/Downtime: Triggering downtime 'http01-p!http-status!icingam01-p-1460584862-3'.
[2016-04-14 04:41:39 +0200] debug/DbEvents: add log entry history for 'http01-p!http-status'
[2016-04-14 04:41:39 +0200] debug/DbEvents: add log entry history for 'http01-p!http-status'
[2016-04-14 04:41:39 +0200] debug/DbEvents: add state change history for 'http01-p!http-status'
[2016-04-14 04:41:39 +0200] notice/Checkable: State Change: Checkable http01-p!http-status hard state change from CRITICAL to WARNING detected.
[2016-04-14 04:41:39 +0200] information/Checkable: Checking for configured notifications for object 'http01-p!http-status'
[2016-04-14 04:41:39 +0200] debug/Checkable: Checkable 'http01-p!http-status' has 1 notification(s).
[2016-04-14 04:41:39 +0200] notice/Notification: Attempting to send notifications for notification object 'http01-p!http-status!mail-to-unarm-prod-server'.
[2016-04-14 04:41:39 +0200] information/Notification: Sending notification 'http01-p!http-status!mail-to-unarm-prod-server' for user 'unarm'
[2016-04-14 04:41:39 +0200] debug/DbEvents: add notification history for 'http01-p!http-status'
[2016-04-14 04:41:39 +0200] debug/DbEvents: add contact notification history for service 'http01-p!http-status' and user 'unarm'.
[2016-04-14 04:41:39 +0200] debug/DbEvents: add log entry history for 'http01-p!http-status'
[2016-04-14 04:41:39 +0200] information/Notification: Completed sending notification 'http01-p!http-status!mail-to-unarm-prod-server' for checkable 'http01-p!http-status'
[2016-04-14 04:44:39 +0200] debug/DbEvents: add log entry history for 'http01-p!http-status'
[2016-04-14 04:44:39 +0200] debug/DbEvents: add state change history for 'http01-p!http-status'
[2016-04-14 04:44:39 +0200] notice/Checkable: State Change: Checkable http01-p!http-status hard state change from WARNING to OK detected.
[2016-04-14 04:44:39 +0200] information/Checkable: Checking for configured notifications for object 'http01-p!http-status'
[2016-04-14 04:44:39 +0200] debug/Checkable: Checkable 'http01-p!http-status' has 1 notification(s).
[2016-04-14 04:44:39 +0200] notice/Notification: Attempting to send notifications for notification object 'http01-p!http-status!mail-to-unarm-prod-server'.
[2016-04-14 04:44:39 +0200] information/Notification: Sending notification 'http01-p!http-status!mail-to-unarm-prod-server' for user 'unarm'
[2016-04-14 04:44:39 +0200] debug/DbEvents: add notification history for 'http01-p!http-status'
[2016-04-14 04:44:39 +0200] debug/DbEvents: add contact notification history for service 'http01-p!http-status' and user 'unarm'.
[2016-04-14 04:44:39 +0200] debug/DbEvents: add log entry history for 'http01-p!http-status'
[2016-04-14 04:44:39 +0200] information/Notification: Completed sending notification 'http01-p!http-status!mail-to-unarm-prod-server' for checkable 'http01-p!http-status'
[2016-04-14 04:53:39 +0200] information/Checkable: Checking for configured notifications for object 'http01-p!http-status'
[2016-04-14 04:53:39 +0200] debug/Checkable: Checkable 'http01-p!http-status' has 1 notification(s).
[2016-04-14 04:53:39 +0200] notice/Notification: Attempting to send notifications for notification object 'http01-p!http-status!mail-to-unarm-prod-server'.
[2016-04-14 04:53:39 +0200] notice/Notification: Not sending notifications for notification object 'http01-p!http-status!mail-to-unarm-prod-server and user 'unarm': type 'DowntimeStart' does not match type filter Unknown, Up, Down and FlappingEnd.
[2016-04-14 04:53:39 +0200] debug/DbEvents: add notification history for 'http01-p!http-status'
[2016-04-14 05:30:53 +0200] notice/ApiListener: Received update for object: {"name":"http01-p!http-status!icingam01-p-1460584862-3","type":"Downtime","version":1460584862.8565349579}
[2016-04-14 05:30:53 +0200] notice/Downtime: Removed downtime 'http01-p!http-status!icingam01-p-1460584862-3' from object 'http01-p!http-status'.
[2016-04-14 05:30:53 +0200] debug/DbEvents: add log entry history for 'http01-p!http-status'
[2016-04-14 05:32:39 +0200] information/Checkable: Checking for configured notifications for object 'http01-p!http-status'
[2016-04-14 05:32:39 +0200] debug/Checkable: Checkable 'http01-p!http-status' has 1 notification(s).
[2016-04-14 05:32:39 +0200] notice/Notification: Attempting to send notifications for notification object 'http01-p!http-status!mail-to-unarm-prod-server'.
[2016-04-14 05:32:39 +0200] notice/Notification: Not sending notifications for notification object 'http01-p!http-status!mail-to-unarm-prod-server and user 'unarm': type 'DowntimeEnd' does not match type filter Unknown, Up, Down and FlappingEnd.
[2016-04-14 05:32:39 +0200] debug/DbEvents: add notification history for 'http01-p!http-status'

In my opinion the first notification at 04:10 shouldn't have been sent out.

If I look at the history tab in Icingaweb2 I see that the downtime entries are:

  • 'DOWNTIME START at 04:41'
  • 'DOWNTIME END at 05:30'

Regards
Mirko

Changesets

2016-05-11 12:13:43 +00:00 by gbeutner 0b95be7

Fix incorrect calculation in Downtime::IsInEffect

fixes #11589

2016-05-12 09:11:03 +00:00 by gbeutner 21d1ffa

Fix incorrect calculation in Downtime::IsInEffect

fixes #11589
@icinga-migration

This comment has been minimized.

Copy link
Member Author

commented Apr 14, 2016

Updated by mfriedrich on 2016-04-14 08:59:57 +00:00

  • Category set to libicinga
  • Priority changed from Normal to High
  • Parent Id set to 11312
@icinga-migration

This comment has been minimized.

Copy link
Member Author

commented Apr 14, 2016

Updated by mfriedrich on 2016-04-14 09:00:13 +00:00

  • Target Version set to 2.4.6
@icinga-migration

This comment has been minimized.

Copy link
Member Author

commented Apr 20, 2016

Updated by gbeutner on 2016-04-20 16:35:40 +00:00

  • Target Version changed from 2.4.6 to 2.4.7
@icinga-migration

This comment has been minimized.

Copy link
Member Author

commented Apr 21, 2016

Updated by gbeutner on 2016-04-21 07:46:59 +00:00

  • Target Version changed from 2.4.7 to 2.4.8
@icinga-migration

This comment has been minimized.

Copy link
Member Author

commented May 11, 2016

Updated by gbeutner on 2016-05-11 12:13:54 +00:00

  • Status changed from New to Assigned
  • Assigned to set to gbeutner
@icinga-migration

This comment has been minimized.

Copy link
Member Author

commented May 11, 2016

Updated by gbeutner on 2016-05-11 12:13:58 +00:00

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

Applied in changeset 0b95be7.

@icinga-migration

This comment has been minimized.

Copy link
Member Author

commented Aug 8, 2016

Updated by mfriedrich on 2016-08-08 11:21:02 +00:00

  • Parent Id deleted 11312
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.