Make prometheus node exporter listen only on adm

This commit is contained in:
Alexandre Iooss 2019-05-05 16:17:52 +02:00
parent 95f24b69af
commit c53d62712f
No known key found for this signature in database
GPG key ID: 6C79278F3FCDCC02
2 changed files with 12 additions and 0 deletions

View file

@ -0,0 +1,5 @@
---
- name: Restart prometheus-node-exporter
service:
name: prometheus-node-exporter
state: restarted

View file

@ -6,3 +6,10 @@
register: apt_result
retries: 3
until: apt_result is succeeded
- name: Make Prometheus node-exporter listen on adm only
lineinfile:
path: /etc/default/prometheus-node-exporter
regexp: '^ARGS='
line: "ARGS=\"--web.listen-address={{ ansible_fqdn }}:9100\""
notify: Restart prometheus-node-exporter