Manage notification handler for Sensu
This patch adds two things:
- the field 'handler' to an alarm. Now an alarm can be described as
alarm_name:
policy: name_of_policy
alerting: enabled_with_notifications
handler: mail
...
- a new parameter 'notification_handler' to pass the handler that
can now be added to an alarm.
Change-Id: I1e0767b3c1aa664110c97ae5f8fafc47c9682ab9
diff --git a/_modules/heka_alarming.py b/_modules/heka_alarming.py
index 83a6445..8376e84 100644
--- a/_modules/heka_alarming.py
+++ b/_modules/heka_alarming.py
@@ -4,7 +4,8 @@
_valid_dimension_re = re.compile(r'^[a-z0-9_/-]+$')
_disallowed_dimensions = ('name', 'value', 'hostname', 'member',
- 'alerting_enabled', 'tag_fields')
+ 'alerting_enabled', 'notification_enabled',
+ 'notification_handler', 'tag_fields')
def alarm_message_matcher(alarm, triggers):