Make prometheus node exporter listen only on adm
This commit is contained in:
parent
95f24b69af
commit
c53d62712f
2 changed files with 12 additions and 0 deletions
5
roles/prometheus-node/handlers/main.yml
Normal file
5
roles/prometheus-node/handlers/main.yml
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
---
|
||||||
|
- name: Restart prometheus-node-exporter
|
||||||
|
service:
|
||||||
|
name: prometheus-node-exporter
|
||||||
|
state: restarted
|
|
@ -6,3 +6,10 @@
|
||||||
register: apt_result
|
register: apt_result
|
||||||
retries: 3
|
retries: 3
|
||||||
until: apt_result is succeeded
|
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
|
||||||
|
|
Loading…
Reference in a new issue