add file change notifiers
diff --git a/heka/server.sls b/heka/server.sls
index 0db26c0..6896a22 100644
--- a/heka/server.sls
+++ b/heka/server.sls
@@ -17,7 +17,8 @@
service.running:
- enable: true
- name: heka
- {#{ server.service }#}
+ - watch:
+ - file: /etc/heka/conf.d/00-hekad.toml
heka_user:
user.present:
@@ -36,6 +37,8 @@
- mode: 640
- require:
- file: /etc/heka/conf.d/00-hekad.toml
+ - watch_in:
+ - service: heka_service
- defaults:
name: {{ name }}
values: {{ values }}
@@ -44,13 +47,15 @@
{%- for name,values in server.output.iteritems() %}
-/etc/heka/conf.d/10-output-{{ name }}-{{ values['engine'] }}.toml:
+/etc/heka/conf.d/60-output-{{ name }}-{{ values['engine'] }}.toml:
file.managed:
- source: salt://heka/files/output/{{ values['engine'] }}.toml
- template: jinja
- mode: 640
- require:
- file: /etc/heka/conf.d/00-hekad.toml
+ - watch_in:
+ - service: heka_service
- defaults:
name: {{ name }}
values: {{ values }}
@@ -60,13 +65,15 @@
{%- for name,values in server.filter.iteritems() %}
-/etc/heka/conf.d/10-filter-{{ name }}-{{ values['engine'] }}.toml:
+/etc/heka/conf.d/20-filter-{{ name }}-{{ values['engine'] }}.toml:
file.managed:
- source: salt://heka/files/filter/{{ values['engine'] }}.toml
- template: jinja
- mode: 640
- require:
- file: /etc/heka/conf.d/00-hekad.toml
+ - watch_in:
+ - service: heka_service
- defaults:
name: {{ name }}
values: {{ values }}
@@ -75,13 +82,15 @@
{%- for name,values in server.splitter.iteritems() %}
-/etc/heka/conf.d/10-splitter-{{ name }}-{{ values['engine'] }}.toml:
+/etc/heka/conf.d/30-splitter-{{ name }}-{{ values['engine'] }}.toml:
file.managed:
- source: salt://heka/files/splitter/{{ values['engine'] }}.toml
- template: jinja
- mode: 640
- require:
- file: /etc/heka/conf.d/00-hekad.toml
+ - watch_in:
+ - service: heka_service
- defaults:
name: {{ name }}
values: {{ values }}
@@ -90,13 +99,15 @@
{%- for name,values in server.encoder.iteritems() %}
-/etc/heka/conf.d/10-encoder-{{ name }}-{{ values['engine'] }}.toml:
+/etc/heka/conf.d/40-encoder-{{ name }}-{{ values['engine'] }}.toml:
file.managed:
- source: salt://heka/files/encoder/{{ values['engine'] }}.toml
- template: jinja
- mode: 640
- require:
- file: /etc/heka/conf.d/00-hekad.toml
+ - watch_in:
+ - service: heka_service
- defaults:
name: {{ name }}
values: {{ values }}
@@ -105,13 +116,15 @@
{%- for name,values in server.decoder.iteritems() %}
-/etc/heka/conf.d/10-decoder-{{ name }}-{{ values['engine'] }}.toml:
+/etc/heka/conf.d/50-decoder-{{ name }}-{{ values['engine'] }}.toml:
file.managed:
- source: salt://heka/files/decoder/{{ values['engine'] }}.toml
- template: jinja
- mode: 640
- require:
- file: /etc/heka/conf.d/00-hekad.toml
+ - watch_in:
+ - service: heka_service
- defaults:
name: {{ name }}
values: {{ values }}