Configure option for sensu_output
This patch configures options for the sensu encoder.
Notification and noop handlers are set to 'default'.
'watchdog_ttl' is set to 120 as previously but it is declared
in map.jinja
Change-Id: I3bfd3da949185ad4af5e5dedbb68d11cedc088e5
diff --git a/heka/map.jinja b/heka/map.jinja
index 2983362..0712436 100644
--- a/heka/map.jinja
+++ b/heka/map.jinja
@@ -39,7 +39,10 @@
{% set default_nagios_host_alarm_clusters = '00-clusters' %}
{% set default_automatic_starting = True %}
{% set default_amqp_port = 5672 %}
+{% set default_sensu_noop_handler = 'default' %}
+{% set default_sensu_notification_handler = 'default' %}
{% set default_sensu_port = 3030 %}
+{% set default_sensu_watchdog_ttl = 120 %}
{% set log_collector = salt['grains.filter_by']({
'default': {
@@ -48,7 +51,10 @@
'automatic_starting': default_automatic_starting,
'metric_collector_host': '127.0.0.1',
'metric_collector_port': 5567,
+ 'sensu_noop_handler': default_sensu_noop_handler,
+ 'sensu_notification_handler': default_sensu_notification_handler,
'sensu_port': default_sensu_port,
+ 'sensu_watchdog_ttl': default_sensu_watchdog_ttl,
}
}, merge=salt['pillar.get']('heka:log_collector')) %}
@@ -61,7 +67,10 @@
'nagios_port': default_nagios_port,
'poolsize': 100,
'automatic_starting': default_automatic_starting,
+ 'sensu_noop_handler': default_sensu_noop_handler,
+ 'sensu_notification_handler': default_sensu_notification_handler,
'sensu_port': default_sensu_port,
+ 'sensu_watchdog_ttl': default_sensu_watchdog_ttl,
}
}, merge=salt['pillar.get']('heka:metric_collector')) %}
@@ -76,7 +85,10 @@
'aggregator_port': default_aggregator_port,
'poolsize': 100,
'automatic_starting': default_automatic_starting,
+ 'sensu_noop_handler': default_sensu_noop_handler,
+ 'sensu_notification_handler': default_sensu_notification_handler,
'sensu_port': default_sensu_port,
+ 'sensu_watchdog_ttl': default_sensu_watchdog_ttl,
}
}, merge=salt['pillar.get']('heka:remote_collector')) %}
@@ -89,7 +101,10 @@
'nagios_default_host_alarm_clusters': default_nagios_host_alarm_clusters,
'poolsize': 100,
'automatic_starting': default_automatic_starting,
+ 'sensu_noop_handler': default_sensu_noop_handler,
+ 'sensu_notification_handler': default_sensu_notification_handler,
'sensu_port': default_sensu_port,
+ 'sensu_watchdog_ttl': default_sensu_watchdog_ttl,
}
}, merge=salt['pillar.get']('heka:aggregator')) %}
@@ -105,6 +120,9 @@
'resource_decoding': False,
'poolsize': 100,
'automatic_starting': default_automatic_starting,
+ 'sensu_noop_handler': default_sensu_noop_handler,
+ 'sensu_notification_handler': default_sensu_notification_handler,
'sensu_port': default_sensu_port,
+ 'sensu_watchdog_ttl': default_sensu_watchdog_ttl,
}
}, merge=salt['pillar.get']('heka:ceilometer_collector')) %}
diff --git a/heka/meta/heka.yml b/heka/meta/heka.yml
index 7d90df0..60ac77e 100644
--- a/heka/meta/heka.yml
+++ b/heka/meta/heka.yml
@@ -69,7 +69,9 @@
module_file: /usr/share/lma_collector/encoders/status_sensu.lua
module_dir: /usr/share/lma_collector/common;/usr/share/heka/lua_modules
config:
- sensu_ttl: 120
+ noop_handler: "{{ log_collector.sensu_noop_handler }}"
+ notification_handler: "{{ log_collector.sensu_notification_handler }}"
+ watchdog_ttl: {{ log_collector.sensu_watchdog_ttl }}
{%- endif %}
{%- endif %}
output:
@@ -156,7 +158,9 @@
module_file: /usr/share/lma_collector/encoders/status_sensu.lua
module_dir: /usr/share/lma_collector/common;/usr/share/heka/lua_modules
config:
- sensu_ttl: 120
+ noop_handler: "{{ metric_collector.sensu_noop_handler }}"
+ notification_handler: "{{ metric_collector.sensu_notification_handler }}"
+ watchdog_ttl: {{ metric_collector.sensu_watchdog_ttl }}
{%- endif %}
{%- if metric_collector.influxdb_host is defined %}
influxdb:
@@ -312,7 +316,9 @@
module_file: /usr/share/lma_collector/encoders/status_sensu.lua
module_dir: /usr/share/lma_collector/common;/usr/share/heka/lua_modules
config:
- sensu_ttl: 120
+ noop_handler: "{{ remote_collector.sensu_noop_handler }}"
+ notification_handler: "{{ remote_collector.sensu_notification_handler }}"
+ watchdog_ttl: {{ remote_collector.sensu_watchdog_ttl }}
{%- endif %}
{%- if remote_collector.influxdb_host is defined %}
influxdb:
@@ -578,7 +584,9 @@
module_file: /usr/share/lma_collector/encoders/status_sensu.lua
module_dir: /usr/share/lma_collector/common;/usr/share/heka/lua_modules
config:
- sensu_ttl: 120
+ noop_handler: "{{ aggregator.sensu_noop_handler }}"
+ notification_handler: "{{ aggregator.sensu_notification_handler }}"
+ watchdog_ttl: {{ aggregator.sensu_watchdog_ttl }}
{%- if aggregator.sensu_source_dimension_key is defined %}
sensu_source_dimension_key: "{{ aggregator.sensu_source_dimension_key }}"
{%- endif %}
@@ -704,7 +712,9 @@
module_file: /usr/share/lma_collector/encoders/status_sensu.lua
module_dir: /usr/share/lma_collector/common;/usr/share/heka/lua_modules
config:
- sensu_ttl: 120
+ noop_handler: "{{ ceilometer_collector.sensu_noop_handler }}"
+ notification_handler: "{{ ceilometer_collector.sensu_notification_handler }}"
+ watchdog_ttl: {{ ceilometer_collector.sensu_watchdog_ttl }}
{%- endif %}
{%- endif %}
{%- if ceilometer_collector.influxdb_host is defined or ceilometer_collector.elasticsearch_host is defined or ceilometer_collector.sensu_host is defined %}