Merge pull request #84 from ppetit/policy

Added a policy for members of node clusters
diff --git a/heka/meta/heka.yml b/heka/meta/heka.yml
index 0910676..fcf3cf0 100644
--- a/heka/meta/heka.yml
+++ b/heka/meta/heka.yml
@@ -375,6 +375,34 @@
           relational_operator: '=='
           threshold: 100
     - status: unknown
+    # A policy that is typically used for storage or compute clusters
+    majority_of_node_members:
+    - status: down
+      trigger:
+        logical_operator: or
+        rules:
+        - function: percent
+          arguments: [ down ]
+          relational_operator: '=='
+          threshold: 100
+    - status: critical
+      trigger:
+        logical_operator: and
+        rules:
+        - function: percent
+          arguments: [ down, critical ]
+          relational_operator: '>='
+          threshold: 50
+    - status: warning
+      trigger:
+        logical_operator: or
+        rules:
+        - function: percent
+          arguments: [ down, critical, warning, unknown ]
+          relational_operator: '>'
+          threshold: 0
+          function: percent      
+    - status: okay  
   input:
     heka_metric:
       engine: tcp