Merge pull request #46 from elemoine/stacklight-fix-policies
Fix the gse_policies structure
diff --git a/heka/files/gse_policies.lua b/heka/files/gse_policies.lua
index 8ec9c06..8de8175 100644
--- a/heka/files/gse_policies.lua
+++ b/heka/files/gse_policies.lua
@@ -29,15 +29,17 @@
logical_operator = '{{ _trigger["logical_operator"] }}',
rules = {
{%- for _rule in _trigger["rules"] %}
- ['function'] = '{{ _rule["function"] }}',
+ {
+ ['function'] = '{{ _rule["function"] }}',
{%- set comma = joiner(",") %}
- ['arguments'] = {
+ ['arguments'] = {
{%- for _argument in _rule["arguments"]|sort -%}
- {{ comma() }}'{{ _argument }}'
+ {{ comma() }}'{{ _argument }}'
{%- endfor -%}
+ },
+ ['relational_operator'] = '{{ _rule["relational_operator"] }}',
+ ['threshold'] = {{ _rule["threshold"] }},
},
- ['relational_operator'] = '{{ _rule["relational_operator"] }}',
- ['threshold'] = {{ _rule["threshold"] }},
{%- endfor %}
},
},