[monitoring] add node_exporter

This commit is contained in:
Simon Bruder 2019-06-17 12:41:54 +00:00
parent 43a3d2db8f
commit edfbe73fc1
No known key found for this signature in database
GPG key ID: 6F03E0000CC5B62F
4 changed files with 25 additions and 0 deletions

View file

@ -18,3 +18,4 @@
tags:
- docker
- role: wireguard
- role: monitoring

View file

@ -0,0 +1,5 @@
---
- name: restart-node-exporter
systemd:
name: prometheus-node-exporter
state: restarted

View file

@ -0,0 +1,7 @@
---
- block:
- import_tasks: node_exporter.yml
tags:
- monitoring:node_exporter
tags:
- monitoring

View file

@ -0,0 +1,12 @@
---
- name: install prometheus node exporter
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=10.80.0.2:9100"
notify: restart-node-exporter