Skip to content
Permalink
Browse files

Add prometheus node_exporter for monitoring

  • Loading branch information...
joeladdison committed Jan 19, 2017
1 parent 60e948c commit 0d8aa2836d04a913d1c57284e5030ef0a7df5075
Showing with 43 additions and 0 deletions.
  1. +11 −0 roles/monitoring/files/node_exporter.service
  2. +28 −0 roles/monitoring/tasks/node_exporter.yml
  3. +4 −0 site.yml
@@ -0,0 +1,11 @@
[Unit]
Description=Node exporter for stats to Prometheus
StartLimitInterval=0

[Service]
ExecStart=/usr/local/bin/node_exporter -collectors.enabled "conntrack,diskstats,entropy,filefd,filesystem,hwmon,loadavf,mdadm,meminfo,netdev,netstat,sockstat,stat,textfile,time,uname,vmstat,systemd"
Restart=always
RestartSec=1

[Install]
WantedBy=multi-user.target
@@ -0,0 +1,28 @@
---
- name: Download node_exporter
get_url:
# stored on local server for performance
# url: "https://github.com/prometheus/node_exporter/releases/download/v0.13.0/node_exporter-0.13.0.linux-amd64.tar.gz"
url: http://gw1/node_exporter-0.13.0.linux-amd64.tar.gz
dest: /tmp

- name: Unpack node_exporter
unarchive:
src: /tmp/node_exporter-0.13.0.linux-amd64.tar.gz
dest: /tmp/node_exporter-0.13.0
copy: no
creates: /tmp/node_exporter-0.13.0

- name: Put node_exporter into place
copy:
src: /tmp/node_exporter-0.13.0/node_exporter
dest: /usr/local/bin/node_exporter

- name: Push systemd videoteam-node_exporter.service
copy:
src: files/videoteam-node_exporter.service
dest: /etc/systemd/system/videoteam-node_exporter.service
notify:
- systemctl daemon-reload
- systemctl enable videoteam-node_exporter
- systemctl start videoteam-node_exporter
@@ -3,3 +3,7 @@
roles:
- shotcut
- fonts

- hosts: onsite
roles:
- monitoring

0 comments on commit 0d8aa28

Please sign in to comment.
You can’t perform that action at this time.