Merge "Add option to disable alarms"
diff --git a/heka/_service.sls b/heka/_service.sls
index dd6c8c1..7af3101 100644
--- a/heka/_service.sls
+++ b/heka/_service.sls
@@ -263,6 +263,7 @@
 
 {%- endfor %}
 
+{%- if server.alarms_enabled %}
 {%- for alarm_name, alarm in service_metadata.get('alarm', {}).iteritems() %}
 
 {%- if alarm.get('enabled', True) %}
@@ -299,6 +300,7 @@
 {%- endif %}
 
 {%- endfor %}
+{%- endif %}
 
 {%- set policy = service_metadata.get('policy') %}
 {%- if policy %}
diff --git a/heka/map.jinja b/heka/map.jinja
index be11040..827f184 100644
--- a/heka/map.jinja
+++ b/heka/map.jinja
@@ -50,6 +50,7 @@
 {% set log_collector = salt['grains.filter_by']({
   'default': {
     'container_mode': False,
+    'alarms_enabled': True,
     'prefix_dir': default_prefix_dir,
     'elasticsearch_port': default_elasticsearch_port,
     'poolsize': 100,
@@ -66,6 +67,7 @@
 {% set metric_collector = salt['grains.filter_by']({
   'default': {
     'container_mode': False,
+    'alarms_enabled': True,
     'prefix_dir': default_prefix_dir,
     'influxdb_port': default_influxdb_port,
     'influxdb_time_precision': default_influxdb_time_precision,
@@ -85,6 +87,7 @@
 {% set remote_collector = salt['grains.filter_by']({
   'default': {
     'container_mode': False,
+    'alarms_enabled': True,
     'prefix_dir': default_prefix_dir,
     'amqp_port': default_amqp_port,
     'amqp_vhost': '',
@@ -106,6 +109,7 @@
 {% set aggregator = salt['grains.filter_by']({
   'default': {
     'container_mode': False,
+    'alarms_enabled': True,
     'prefix_dir': default_prefix_dir,
     'influxdb_port': default_influxdb_port,
     'influxdb_time_precision': default_influxdb_time_precision,
@@ -125,6 +129,7 @@
 {% set ceilometer_collector = salt['grains.filter_by']({
   'default': {
     'container_mode': False,
+    'alarms_enabled': True,
     'prefix_dir': default_prefix_dir,
     'influxdb_port': default_influxdb_port,
     'influxdb_timeout': default_influxdb_timeout,