diff --git a/backoffice.yaml b/backoffice.yaml index 0ea4a4a..4082776 100644 --- a/backoffice.yaml +++ b/backoffice.yaml @@ -33,6 +33,11 @@ name: prometheus state: reloaded + - name: prometheus-node-exporter is restarted + service: + name: prometheus-node-exporter + state: restarted + - name: promtail is restarted service: name: promtail diff --git a/tasks/prometheus.yaml b/tasks/prometheus.yaml index 8a9589e..232d123 100644 --- a/tasks/prometheus.yaml +++ b/tasks/prometheus.yaml @@ -48,6 +48,19 @@ notify: - prometheus is reloaded +- name: prometheus-node-exporter invocation is configured + replace: + path: /etc/default/prometheus-node-exporter + regexp: '(?ms)^ARGS=".+?"$' + replace: |- + ARGS="--collector.diskstats.ignored-devices=^(ram|loop|fd|(h|s|v|xv)d[a-z]|nvme\\d+n\\d+p)\\d+$ \ + --collector.filesystem.ignored-mount-points=^/(sys|proc|dev|run)($|/) \ + --collector.netdev.ignored-devices=^lo$ \ + --collector.textfile.directory=/var/lib/prometheus/node-exporter \ + --collector.systemd" + notify: + - prometheus-node-exporter is restarted + - name: prometheus-textfile group exists group: name: prometheus-textfile