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 #9969] Problem notifications while Flapping is active #3303

Closed
icinga-migration opened this issue Aug 20, 2015 · 18 comments
Closed
Milestone

Comments

@icinga-migration
Copy link
Member

@icinga-migration icinga-migration commented Aug 20, 2015

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

Created by chrostek on 2015-08-20 15:49:51 +00:00

Assignee: mfriedrich
Status: Resolved (closed on 2016-02-23 15:30:03 +00:00)
Target Version: 2.4.4
Last Update: 2016-04-01 11:04:14 +00:00 (in Redmine)

Icinga Version: 2.3.8
Backport?: Already backported
Include in Changelog: 0

There is a problem with notifications while a flapping is detected.
In Icinga 1 all problem notifications where disabled while a flapping was active.
Unfortunately in Icinga 2 the problem notifications are enabled while a flapping is active:

PROBLEM / WARNING - 2015-08-09 14:49:30
FLAPPINGSTART / CRITICAL - 2015-08-09 14:53:30
PROBLEM / CRITICAL - 2015-08-09 14:53:34
PROBLEM / WARNING - 2015-08-09 14:55:30
RECOVERY / OK - 2015-08-09 14:56:30
PROBLEM / WARNING - 2015-08-09 14:58:30
PROBLEM / CRITICAL - 2015-08-09 15:00:30
PROBLEM / WARNING - 2015-08-09 15:01:30
PROBLEM / CRITICAL - 2015-08-09 15:02:30
PROBLEM / WARNING - 2015-08-09 15:03:30
PROBLEM / CRITICAL - 2015-08-09 15:04:30
PROBLEM / WARNING - 2015-08-09 15:06:30
PROBLEM / CRITICAL - 2015-08-09 15:07:30
RECOVERY / OK - 2015-08-09 15:11:29
FLAPPINGEND / OK - 2015-08-09 15:24:30

Attachments

Changesets

2016-02-22 18:48:22 +00:00 by chrostek b223431

Fix problem notifications while flapping is active

refs #9969
refs #9642

2016-02-23 15:27:22 +00:00 by chrostek 83845e6

Fix problem notifications while flapping is active

fixes #9969
fixes #9642

2016-03-11 14:24:02 +00:00 by chrostek f5f0f7b

Fix problem notifications while flapping is active

fixes #9969
fixes #9642

Relations:

@icinga-migration
Copy link
Member Author

@icinga-migration icinga-migration commented Aug 21, 2015

Updated by mfriedrich on 2015-08-21 18:56:32 +00:00

  • Relates set to 9642
@icinga-migration
Copy link
Member Author

@icinga-migration icinga-migration commented Aug 21, 2015

Updated by mfriedrich on 2015-08-21 18:57:29 +00:00

  • Status changed from New to Feedback
  • Assigned to set to chrostek

Please attach a test config for easily reproduce the issue, as well as debug log output regarding flapping and notifications.

@icinga-migration
Copy link
Member Author

@icinga-migration icinga-migration commented Aug 22, 2015

Updated by chrostek on 2015-08-22 18:00:03 +00:00

  • File added etc.tar.gz
  • File added debug.log

Attached a very simple config with only one host and one service to reproduce it. debug.log is also attached.

Maybe i already found the problem:

in /ib/icinga/checkable-check.cpp
--> Checkable::ProcessCheckResult
between lines 345 and 360:

if (!was_flapping && is_flapping) {
[...]
} else if (was_flapping && !is_flapping) {
[...]
} else if (send_notification)
[...]

This code only checks, if a flapping begins or ends ... i think if flapping is active "was_flapping" and "is_flapping" are true ...
with this line 359 it should work:

} else if (send_notification && !is_flapping && !was_flapping)

@icinga-migration
Copy link
Member Author

@icinga-migration icinga-migration commented Sep 9, 2015

Updated by chrostek on 2015-09-09 18:47:40 +00:00

  • File added 0001-Fix-buggy-flapping-notifications.patch

Can someone please test the attached patch? Should solve #9969 and #9642

@icinga-migration
Copy link
Member Author

@icinga-migration icinga-migration commented Sep 10, 2015

Updated by mfriedrich on 2015-09-10 07:18:57 +00:00

  • Status changed from Feedback to Assigned
  • Assigned to changed from chrostek to mfriedrich

Thanks for the patch, much appreciated. I'll look into it :)

Kind regards,
Michael

@icinga-migration
Copy link
Member Author

@icinga-migration icinga-migration commented Dec 7, 2015

Updated by jamacias on 2015-12-07 04:25:06 +00:00

Hi,
I am currently using icinga2 version 2.4.1. and experiencing the same problem, I am getting notifications after receiving the FLAPPINGSTART notification. I looked at the patch that chroslek provided in order to test it but was not able to find the file the patch is referring to checkable-check.cpp. I am using CentOS 6.7. Can anyone give some feedback regarding this issue.

Best regards,
Antonio Macias

@icinga-migration
Copy link
Member Author

@icinga-migration icinga-migration commented Dec 7, 2015

Updated by chrostek on 2015-12-07 04:53:30 +00:00

Hi,

https://github.com/Icinga/icinga2/blob/master/lib/icinga/checkable-check.cpp

lib/icinga/checkable-check.cpp

@icinga-migration
Copy link
Member Author

@icinga-migration icinga-migration commented Dec 7, 2015

Updated by jamacias on 2015-12-07 06:58:28 +00:00

I see. I will not be able to test it in my current environment because I installed using Icinga's repository, not from source code.
Anyway, the problem is still there when you install using the stable repository release 2.4.1

name=ICINGA (stable release for epel)
baseurl=http://packages.icinga.org/epel/$releasever/release/

Antonio

@icinga-migration
Copy link
Member Author

@icinga-migration icinga-migration commented Feb 16, 2016

Updated by chrostek on 2016-02-16 13:39:48 +00:00

I have tested the patch. It fixes this issue and #9642
please apply my patch.

@icinga-migration
Copy link
Member Author

@icinga-migration icinga-migration commented Feb 22, 2016

Updated by mfriedrich on 2016-02-22 18:49:33 +00:00

  • Target Version set to Backlog
@icinga-migration
Copy link
Member Author

@icinga-migration icinga-migration commented Feb 23, 2016

Updated by mfriedrich on 2016-02-23 15:26:38 +00:00

  • Target Version changed from Backlog to 2.4.3

Thanks, merged :)

@icinga-migration
Copy link
Member Author

@icinga-migration icinga-migration commented Feb 23, 2016

Updated by chrostek on 2016-02-23 15:30:03 +00:00

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

Applied in changeset 83845e6.

@icinga-migration
Copy link
Member Author

@icinga-migration icinga-migration commented Feb 24, 2016

Updated by mfriedrich on 2016-02-24 09:53:29 +00:00

  • Target Version changed from 2.4.3 to 2.4.4
@icinga-migration
Copy link
Member Author

@icinga-migration icinga-migration commented Mar 11, 2016

Updated by mfriedrich on 2016-03-11 14:24:37 +00:00

  • Backport? changed from Not yet backported to Already backported
@icinga-migration
Copy link
Member Author

@icinga-migration icinga-migration commented Mar 15, 2016

Updated by gbeutner on 2016-03-15 13:34:09 +00:00

  • Include in Changelog changed from 1 to 0
@icinga-migration
Copy link
Member Author

@icinga-migration icinga-migration commented Mar 17, 2016

Updated by jamacias on 2016-03-17 23:28:30 +00:00

I'm still seeing the same problem. I updated icinga2 to the latest version 2.4.4 and learned that the problem indicated by Bug #9969 is still there. I updated using the rpm repository. I get PROBLEM emails after the flapping has been turned on. I'm using the GUI icingaweb2. I enabled flap detection for a service. I did stop receiving RECOVERY emails however.

@icinga-migration
Copy link
Member Author

@icinga-migration icinga-migration commented Apr 1, 2016

Updated by mfriedrich on 2016-04-01 11:04:14 +00:00

Open a new issue then please.

@icinga-migration
Copy link
Member Author

@icinga-migration icinga-migration commented Jun 7, 2016

Updated by mfriedrich on 2016-06-07 20:14:14 +00:00

  • Relates set to 11899
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant
You can’t perform that action at this time.