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

Ignore flapping state if flapping detection isn't enabled #230

Merged
merged 1 commit into from
Jul 19, 2024

Conversation

yhabteab
Copy link
Member

@yhabteab yhabteab commented Jul 8, 2024

The Icinga 2 Checkable flapping runtime attribute is always updated even when flapping detection is disabled and leads to false positives, causing Icinga Notifications to falsely suppress an incident. To prevent this, this PR additionally checks for the enable_flapping attribute of a checkable and globally for the IcingaApplication type.

And YES, I can safely use app as a json key because of this.

[2024-07-08 11:20:18 +0200] critical/config: Error: Validation failed for object 'my-app' of type 'IcingaApplication'; Attribute 'name': Application object must be named 'app'.
Location: in /Users/yhabteab/Workspace/icinga2/prefix/etc/icinga2/features-enabled/app.conf: 1:0-1:32
/Users/yhabteab/Workspace/icinga2/prefix/etc/icinga2/features-enabled/app.conf(1): object IcingaApplication "my-app" {}
                                                                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/Users/yhabteab/Workspace/icinga2/prefix/etc/icinga2/features-enabled/app.conf(2): 
/Users/yhabteab/Workspace/icinga2/prefix/etc/icinga2/features-enabled/app.conf(3):

@yhabteab yhabteab added the bug Something isn't working label Jul 8, 2024
@cla-bot cla-bot bot added the cla/signed CLA is signed by all contributors of a PR label Jul 8, 2024
internal/icinga2/util.go Show resolved Hide resolved
internal/icinga2/util.go Outdated Show resolved Hide resolved
@yhabteab yhabteab requested a review from julianbrost July 8, 2024 12:25
@yhabteab yhabteab force-pushed the flapping-issue branch 2 times, most recently from 8ff387b to 03b8954 Compare July 12, 2024 08:21
@yhabteab yhabteab requested review from julianbrost and removed request for julianbrost July 12, 2024 08:21
@julianbrost julianbrost requested a review from oxzi July 12, 2024 08:23
@yhabteab yhabteab self-assigned this Jul 12, 2024
internal/icinga2/client_api.go Show resolved Hide resolved
internal/icinga2/client_api.go Outdated Show resolved Hide resolved
internal/icinga2/client_api.go Show resolved Hide resolved
internal/icinga2/util.go Show resolved Hide resolved
oxzi
oxzi previously approved these changes Jul 15, 2024
internal/icinga2/api_responses.go Outdated Show resolved Hide resolved
@julianbrost julianbrost merged commit f3ad7bd into main Jul 19, 2024
12 checks passed
@julianbrost julianbrost deleted the flapping-issue branch July 19, 2024 09:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working cla/signed CLA is signed by all contributors of a PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants