Fixed how services works in prometheus exporters

This commit is contained in:
Eric Renfro 2019-05-08 10:26:22 -04:00
parent 665247bedc
commit 056a450ad0
Signed by: psi-jack
GPG key ID: 14977F3A50D9A5BF

View file

@ -19,9 +19,10 @@
- require:
- file: {{ exporter }}-exporter-bin-dir
{#
{{ exporter }}_exporter_service:
service.running:
- name: {{ exporter }}-exporter
- name: {{ exporter }}_exporter
- enable: True
{%- if grains.get('noservices') %}
- onlyif: /bin/false
@ -30,6 +31,7 @@
- watch:
- file: {{ exporter }}_exporter_service_config_file
{%- endif %}
#}
{%- for svc, svc_parameters in parameters.get('services', {}).iteritems() %}
{%- if svc_parameters.get('enabled', False) %}
@ -52,7 +54,12 @@
- require:
- archive: {{ exporter }}_exporter_extracted
- watch_in:
- service: {{ exporter }}_exporter_service
- service: {{ exporter }}_{{ svc }}_exporter_service
{{ exporter }}_{{ svc }}_exporter_service:
service.running:
- name: {{ svc}}
- enable: True
{#
{{ _exporter_serviceorter }}_{{ svc }}_exporter_config_file: