[base:monitoring] node exporter: only listen on vpn ip address
This commit is contained in:
parent
db68d120d5
commit
7f4d1109bc
|
@ -11,3 +11,6 @@ servers:
|
|||
gateway: 192.168.100.1
|
||||
netmask: 255.255.255.0
|
||||
interface: enp0s25
|
||||
vpn:
|
||||
v4:
|
||||
address: 10.80.0.1
|
||||
|
|
|
@ -4,3 +4,7 @@
|
|||
name: systemd-journald
|
||||
state: restarted
|
||||
|
||||
- name: restart-node-exporter
|
||||
systemd:
|
||||
name: prometheus-node-exporter
|
||||
state: restarted
|
||||
|
|
|
@ -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
|
||||
|
|
Reference in a new issue