Initial commit
configure node_exporter to listen to the vpn ip
This commit is contained in:
commit
84f55900cb
7
README.md
Normal file
7
README.md
Normal file
@ -0,0 +1,7 @@
|
||||
# Monitored ansible role
|
||||
|
||||
This ansible role enables prometheus-node-exporter on a private IP (from tinc VPN).
|
||||
|
||||
# Expected host vars
|
||||
|
||||
**vpn_ip**
|
15
tasks/main.yml
Normal file
15
tasks/main.yml
Normal file
@ -0,0 +1,15 @@
|
||||
---
|
||||
|
||||
- name: configure node_exporter
|
||||
lineinfile:
|
||||
path: /etc/conf.d/prometheus-node-exporter
|
||||
regexp: '^NODE_EXPORTER_ARGS='
|
||||
line: NODE_EXPORTER_ARGS="--web.listen-address={{ vpn_ip }}:9100
|
||||
create: yes
|
||||
|
||||
- name: Enable node_exporter
|
||||
systemd:
|
||||
enabled: true
|
||||
state: started
|
||||
name: prometheus-node-exporter
|
||||
|
Loading…
Reference in New Issue
Block a user