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

Fix [#873]: Don't notify if parents down #995

Conversation

tsadpbb
Copy link
Contributor

@tsadpbb tsadpbb commented Oct 4, 2024

A few things here. I noticed that a lot of logic for handling whether a recovery notification was sent used the assumption that the service_notification command always sends a notification (it doesn't) so I moved the resetting of notified_on and the notification number into the notification commands

I also wanted the notification command to differentiate between normal and recovery notifications so I also added that functionality.

This was all so that I could accurately handle sending of recovery notifications so I can suppress any notifications if the parents is found to be down. Debating whether or not I should make this behavior dependent on a flag that is set.

I also added a test notification file to test the notification viability commands. Ideally, we would be able to use both the logic in the async handler functions and the notification viability testing together but there are some issues that need to get dealt with first to make that a reality.

I also noticed that e7a17b3 introduced a bug by switching the logic for when a parent host check is propagated upwards. I fixed that as well

include/nagios.h Outdated Show resolved Hide resolved
@dylan-at-nagios dylan-at-nagios merged commit c378fd1 into NagiosEnterprises:master Oct 23, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants