Fixed how services works in prometheus exporters
This commit is contained in:
parent
665247bedc
commit
056a450ad0
1 changed files with 9 additions and 2 deletions
|
@ -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:
|
||||
|
|
Loading…
Reference in a new issue