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 #12670] Forced custom notification is setting "force_next_notification": true permanently #4646

Closed
icinga-migration opened this issue Sep 7, 2016 · 3 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/12670

Created by matus on 2016-09-07 14:37:49 +00:00

Assignee: mfriedrich
Status: Resolved (closed on 2016-11-17 10:55:03 +00:00)
Target Version: 2.6.0
Last Update: 2016-11-17 10:55:03 +00:00 (in Redmine)

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

Hi,

Not sure if this is a bug or I'm doing something wrong.

All notifications were working as expected, they were sent according to configured time periods until I sent custom notification from web interface and check the "Forced" option.

Checking "Forced" option had set the "force_next_notification: true" and all other notifications for this service/host are always forced and ignoring the time periods. In order to clear the flag force_next_notification I had to delete /var/lib/icinga2/icinga2.state.

Is this behaviour expected? Is there any other way of clearing/setting the "force_next_notification"

I have tested it on: icinga 2.5.4-1ppa1trusty2, icingaweb 2.3.4-3ppa1, and icinga 2.4.4-1ppa1trusty1, icingaweb 2.2.0-1ppa1. Same result.

I can pass the configs, but I believe you should be able to replicate it without it.

Thanks
Matus

Changesets

2016-11-17 10:53:35 +00:00 by mfriedrich a13e6b3

Fix that custom notifications do not reset force_next_notification

This attribute is stored in the state file forever as well.
Will cause forced notifications ignoring state/type filters.

fixes #12670

2016-11-28 11:10:13 +00:00 by mfriedrich 8d47b55

Fix that custom notifications do not reset force_next_notification

This attribute is stored in the state file forever as well.
Will cause forced notifications ignoring state/type filters.

fixes #12670
@icinga-migration
Copy link
Author

Updated by mfriedrich on 2016-11-16 09:18:41 +00:00

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

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2016-11-17 10:46:12 +00:00

  • Target Version set to 2.6.0

Nice catch, thanks.

object Host "12670-host" {
  check_command = "dummy"
  enable_active_checks = false
}

object User "12670-user" {
  email = "michael.friedrich@icinga.com"
}

object NotificationCommand "12670-host-notification" {
  command = [ "/bin/true" ]
}

object Notification "12670-notification-host" {
  host_name = "12670-host"
  command = "12670-host-notification"
  users = [ "12670-user" ]


  types = [ "Custom" ]
  states = [ "Up", "Down" ]
}

force_next_notification": true,

[2016-11-17 11:31:22 +0100] information/ExternalCommandListener: Executing external command: [1479378682] SCHEDULE_FORCED_HOST_CHECK;12670-host;1479378682
[2016-11-17 11:31:23 +0100] information/IdoMysqlConnection: Query queue items: 0, query rate: 1.78333/s (107/min 107/5min 107/15min);
[2016-11-17 11:31:36 +0100] information/ExternalCommandListener: Executing external command: [1479378696] PROCESS_HOST_CHECK_RESULT;12670-host;1;fdsfsfsf
[2016-11-17 11:31:38 +0100] information/IdoMysqlConnection: Query queue items: 0, query rate: 3.13333/s (188/min 188/5min 188/15min);
[2016-11-17 11:31:50 +0100] information/ExternalCommandListener: Executing external command: [1479378710] SEND_CUSTOM_HOST_NOTIFICATION;12670-host;2;icingaadmin;force test
[2016-11-17 11:31:50 +0100] information/Checkable: Checking for configured notifications for object '12670-host'
[2016-11-17 11:31:50 +0100] information/Notification: Sending 'Custom' notification '12670-host!12670-notification-host for user '12670-user'
[2016-11-17 11:31:50 +0100] information/Notification: Sending 'Custom' notification '12670-host!host-all for user 'icingaadmin'
[2016-11-17 11:31:50 +0100] information/Notification: Completed sending 'Custom' notification '12670-host!12670-notification-host' for checkable '12670-host' and user '12670-user'.
[2016-11-17 11:31:50 +0100] warning/PluginNotificationTask: Notification command for object '12670-host' (PID: 23407, arguments: '/bin/true') terminated with exit code 128, output: execvpe(/bin/true) failed: No such file or directory

[2016-11-17 11:32:37 +0100] information/ExternalCommandListener: Executing external command: [1479378757] PROCESS_HOST_CHECK_RESULT;12670-host;1;fsdfsd
[2016-11-17 11:32:38 +0100] information/IdoMysqlConnection: Query queue items: 0, query rate: 8.91667/s (535/min 723/5min 723/15min);
[2016-11-17 11:32:44 +0100] information/ExternalCommandListener: Executing external command: [1479378764] PROCESS_HOST_CHECK_RESULT;12670-host;1;fsdfss
[2016-11-17 11:32:44 +0100] information/Checkable: Checking for configured notifications for object '12670-host'
[2016-11-17 11:32:44 +0100] information/Notification: Sending 'Problem' notification '12670-host!12670-notification-host for user '12670-user'
[2016-11-17 11:32:44 +0100] information/Notification: Sending 'Problem' notification '12670-host!host-all for user 'icingaadmin'
[2016-11-17 11:32:44 +0100] information/Notification: Completed sending 'Problem' notification '12670-host!12670-notification-host' for checkable '12670-host' and user '12670-user'.
[2016-11-17 11:32:44 +0100] information/Notification: Completed sending 'Problem' notification '12670-host!host-all' for checkable '12670-host' and user 'icingaadmin'.

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2016-11-17 10:55:03 +00:00

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

Applied in changeset a13e6b3.

@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