[base:monitoring] node exporter: only listen on vpn ip address

This commit is contained in:
Simon Bruder 2019-05-19 14:03:09 +00:00
parent db68d120d5
commit 7f4d1109bc
No known key found for this signature in database
GPG key ID: 6F03E0000CC5B62F
3 changed files with 14 additions and 0 deletions

View file

@ -11,3 +11,6 @@ servers:
gateway: 192.168.100.1
netmask: 255.255.255.0
interface: enp0s25
vpn:
v4:
address: 10.80.0.1

View file

@ -4,3 +4,7 @@
name: systemd-journald
state: restarted
- name: restart-node-exporter
systemd:
name: prometheus-node-exporter
state: restarted

View file

@ -3,3 +3,10 @@
apt:
name: prometheus-node-exporter
state: present
- name: set node exporter config
lineinfile:
path: /etc/default/prometheus-node-exporter
regexp: '^ARGS='
line: ARGS="--web.listen-address={{ vpn.v4.address }}:9100"
notify: restart-node-exporter