[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
|
gateway: 192.168.100.1
|
||||||
netmask: 255.255.255.0
|
netmask: 255.255.255.0
|
||||||
interface: enp0s25
|
interface: enp0s25
|
||||||
|
vpn:
|
||||||
|
v4:
|
||||||
|
address: 10.80.0.1
|
||||||
|
|
|
@ -4,3 +4,7 @@
|
||||||
name: systemd-journald
|
name: systemd-journald
|
||||||
state: restarted
|
state: restarted
|
||||||
|
|
||||||
|
- name: restart-node-exporter
|
||||||
|
systemd:
|
||||||
|
name: prometheus-node-exporter
|
||||||
|
state: restarted
|
||||||
|
|
|
@ -3,3 +3,10 @@
|
||||||
apt:
|
apt:
|
||||||
name: prometheus-node-exporter
|
name: prometheus-node-exporter
|
||||||
state: present
|
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