naparuba/shinken — pull request #1037 by geektophe (2013-11-26 15:08:25+00:00)
Title: Added bp_rule child notification options enforcement

This patch adds childs notification options enforcement to business rules.

The main purpose is to allow to easily build consolidated checks through business rules.

It adds two attributes named `business_rule_host_notification_options` and `business_rule_service_notification_options`. If set, all hosts/services composing the business rule will be set the `notification_options` parameter to this value.

**Example**

A cluster is composed of many hosts, all using a template from a pack allowing to check CPU usage. You want to have a consolidated notification giving the list of servers that are eating too much CPU, rather than having dozens of notifications at the same time. You may write the configuration as follows:

define host {
...
use ...,linux,...
host_name www-001
hostgroups www
...
}
define host {
...
use ...,linux,...
host_name www-002
hostgroups www
...
}
...
define service {
...
service_description Consolidated CPU
check_command bp_rule!g:www,Cpu
business_rule_service_notification_options n
...
}

This will automatically set `notification_options` to `n` on all hosts of `www` hostgroup, and alert only once when at least one host eats too much CPU.