Redefine alerting property
The alerting property can be one of 'disabled', 'enabled' or
'enabled_with_notification'
diff --git a/_modules/heka_alarming.py b/_modules/heka_alarming.py
index d87ed73..b12fa23 100644
--- a/_modules/heka_alarming.py
+++ b/_modules/heka_alarming.py
@@ -26,6 +26,14 @@
return ' || '.join(matchers)
+def alarm_activate_alerting(alerting):
+ return 'true' if alerting in ['enabled', 'enabled_with_notification'] else 'false'
+
+
+def alarm_enable_notification(alerting):
+ return 'true' if alerting == 'enabled_with_notification' else 'false'
+
+
def alarm_cluster_message_matcher(alarm_cluster):
"""
Return an Heka message matcher expression for a given alarm cluster.