Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add prometheus node_exporter for monitoring
- Loading branch information
1 parent
60e948c
commit 0d8aa28
Showing
3 changed files
with
43 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,3 +3,7 @@ | |
roles: | ||
- shotcut | ||
- fonts | ||
|
||
- hosts: onsite | ||
roles: | ||
- monitoring |