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 #1825 : BP rules: take into account acknowledgements and downtime #1837

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

fpeyre
Copy link
Contributor

@fpeyre fpeyre commented Apr 12, 2016

Add two parameters for a BP rule deactivate by default : business_rule_ack_as_ok and business_rule_downtime_as_ok
If activate, we treat host/service acknowledged/in downtime as if they are Up/Ok for the evaluation of the bp rule

@tomasz-kuzemko
Copy link

tomasz-kuzemko commented Apr 21, 2016

I'm looking forward for this feature.

What about treating downtimes as OK too? As there is business_rule_downtime_as_ack, one might expect that in combination with business_rule_ack_as_ok it will also be treated as OK.

@xkilian
Copy link

xkilian commented Apr 22, 2016

@tomasz-kuzemko One might expect that in combination with business_rule_ack_as_ok it will also be treated as OK... But no, it does not work.
acknowledgements are treated as ok on services. Downtimes are not treated as acks and also are not treated as ok. As subsequent change would need to be required to do as you request. For now, the feature works as advertised and is a requirement for BP rules that provide status on groups of independant services.

@fpeyre
Copy link
Contributor Author

fpeyre commented Apr 22, 2016

I just made a quick test for treating downtime as OK too.
We can use the same idea as business_rule_ack_as_ok. I quickly added a new parameter, business_rule_downtime_as_ok and it works just the same.

For business_rule_downtime_as_ack, according to the documentation, it said
"By default, downtimes are not taken into account by business rules smart notifications processing. This variable allows to extend smart notifications to underlying hosts or services checks under downtime (they are treated as if they were acknowledged)."

As I understand, and after looking quickly at the code, this parameter is used only on the step to determine if a notification must be sent or not (and in this case, with this parameter, the host/service in downtime has the same behaviour as if it was acknowledged)
But it is not considered as acknowledged by the rest of code ( and in our case , the step when a BP rule is evaluated). We can rename business_rule_downtime_as_ack for something less ambiguous, like business_rule_smart_notification_downtime.

Anyway, this features could make the object of another pull request/issue

@fpeyre fpeyre changed the title Fix #1825 : BP rules: take into account acknowledgements Fix #1825 : BP rules: take into account acknowledgements and downtime Apr 25, 2016
@geektophe
Copy link
Collaborator

In my opinion, there are 2 different aspects.

  • The first one, which is the purpose of smart notifications, is to alter the conditions under which notifications are sent in business rules. Smart notification do not alter the way the state is calculated. This is the expected behavior.
  • The PR you're proposing does alter the state processing, as the result is to ignore acknowledged problems (or problems under downtime), which may bring a biased information.

Those 2 different ways to approach business rules state and notifications processing should be clearly identified through the configuration options, and in the code.

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.

4 participants