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:
|
- require:
|
||||||
- file: {{ exporter }}-exporter-bin-dir
|
- file: {{ exporter }}-exporter-bin-dir
|
||||||
|
|
||||||
|
{#
|
||||||
{{ exporter }}_exporter_service:
|
{{ exporter }}_exporter_service:
|
||||||
service.running:
|
service.running:
|
||||||
- name: {{ exporter }}-exporter
|
- name: {{ exporter }}_exporter
|
||||||
- enable: True
|
- enable: True
|
||||||
{%- if grains.get('noservices') %}
|
{%- if grains.get('noservices') %}
|
||||||
- onlyif: /bin/false
|
- onlyif: /bin/false
|
||||||
|
@ -30,6 +31,7 @@
|
||||||
- watch:
|
- watch:
|
||||||
- file: {{ exporter }}_exporter_service_config_file
|
- file: {{ exporter }}_exporter_service_config_file
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
|
#}
|
||||||
|
|
||||||
{%- for svc, svc_parameters in parameters.get('services', {}).iteritems() %}
|
{%- for svc, svc_parameters in parameters.get('services', {}).iteritems() %}
|
||||||
{%- if svc_parameters.get('enabled', False) %}
|
{%- if svc_parameters.get('enabled', False) %}
|
||||||
|
@ -52,7 +54,12 @@
|
||||||
- require:
|
- require:
|
||||||
- archive: {{ exporter }}_exporter_extracted
|
- archive: {{ exporter }}_exporter_extracted
|
||||||
- watch_in:
|
- 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:
|
{{ _exporter_serviceorter }}_{{ svc }}_exporter_config_file:
|
||||||
|
|
Loading…
Reference in a new issue