Hi,
I have tried to decode the logic for processing events and generating notifications (for 1.5.0). Can somebody confirm that this is correct ? I think that there may be a few minor details that I am missing.
1. The entity name and check name are added as two additional tags to the incoming event tags
2. Apply filtering to events. The event is discarded if ANY of the following are true:
2.1 state is Ok
2.2 entity/check is in scheduled or unscheduled maintenance
2.3 current state duration for entity/check < initial_failure_delay (default 30 sec, can be specified in the incoming event)
2.4. time since last notification < repeat_failure_delay (default 60 sec, can be specified in the incoming event)
3. If the event was not discarded at step 2, generate a notification.
4. For each contact (Note: are these really all the contacts?)
4.1. KEEP the notification rules for which ALL of the following are true:
4.1.1 each rule tag is included in the event tags
4.1.2 each rule regex_tags matches at least one of the event tags (Note: the implementation for this is buggy)
4.1.3 rule has no entities or its entities include the event entity
4.1.4 each rule regex_entities matches the event entity (Note: this is strange)
4.1.5 the time restrictions of the rule match the event time
4.2 If there are no remaining notification rules, continue to the next contact
4.3 If one of the remaining notification rules has <event_state>_blackhole == true, then continue to the next contact
4.4 collect the set of media from the remaining notification rules, and send the notification to that media
are extended with a tag