Skip to content

Commit

Permalink
fix(node_exporter): allow standalone use of node_exporter
Browse files Browse the repository at this point in the history
  • Loading branch information
alxwr committed Oct 17, 2019
1 parent 07d6209 commit a0d8ad4
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
4 changes: 2 additions & 2 deletions prometheus/config/file/install.sls
Expand Up @@ -16,8 +16,8 @@ include:
prometheus-config-file-etc-file-directory:
file.directory:
- name: {{ prometheus.dir.etc }}
- user: prometheus
- group: prometheus
- user: root
- group: {{ prometheus.rootgroup }}
- mode: 755
- makedirs: True
- require:
Expand Down
6 changes: 6 additions & 0 deletions prometheus/service/running.sls
Expand Up @@ -11,6 +11,7 @@ include:
- {{ sls_config_args }}
- {{ sls_config_file }}
{%- if 'prometheus' in prometheus.wanted %}
prometheus-config-file-var-file-directory:
file.directory:
- name: {{ prometheus.dir.var }}
Expand All @@ -20,6 +21,7 @@ prometheus-config-file-var-file-directory:
- makedirs: True
- require:
- file: prometheus-config-file-etc-file-directory
{%- endif %}
{%- for name in prometheus.wanted %}
{%- if name in prometheus.service %}
Expand All @@ -34,8 +36,10 @@ prometheus-config-file-var-file-directory:
prometheus-service-running-{{ name }}-service-unmasked:
service.unmasked:
- name: {{ service_name }}
{%- if 'prometheus' in prometheus.wanted %}
- require:
- file: prometheus-config-file-var-file-directory
{%- endif %}
- onlyif:
- systemctl list-units | grep {{ service_name }} >/dev/null 2>&1
{%- endif %}
Expand All @@ -48,8 +52,10 @@ prometheus-service-running-{{ name }}-service-running:
- watch:
- file: prometheus-config-file-{{ name }}-file-managed
{%- endif %}
{%- if 'prometheus' in prometheus.wanted %}
- require:
- file: prometheus-config-file-var-file-directory
{%- endif %}
{%- if grains.kernel|lower == 'linux' %}
- service: prometheus-service-running-{{ name }}-service-unmasked
- onlyif: systemctl list-units | grep {{ service_name }} >/dev/null 2>&1
Expand Down

0 comments on commit a0d8ad4

Please sign in to comment.