Skip to content

Instantly share code, notes, and snippets.

@saitoxu
Last active Mar 22, 2018
Embed
What would you like to do?
how to install node_exporter (CentOS 7.4)
$ sudo su -
$ cd /opt
$ wget https://github.com/prometheus/node_exporter/releases/download/v0.15.2/node_exporter-0.15.2.linux-amd64.tar.gz
$ tar xzvf node_exporter-0.15.2.linux-amd64.tar.gz
$ mv node_exporter-0.15.2.linux-amd64.tar.gz /usr/local/src/
$ mv node_exporter-0.15.2.linux-amd64 node_exporter
$ vim /etc/systemd/system/node_exporter.service
$ vim /etc/default/node_exporter
$ systemctl daemon-reload
$ systemctl enable node_exporter.service
$ systemctl start node_exporter.service
$ systemctl status -l node_exporter.service
[Unit]
Description=Node exporter for prometheus
After=network.target
[Service]
Type=simple
EnvironmentFile=-/etc/default/node_exporter
ExecStart=/opt/node_exporter/node_exporter $OPTIONS
PrivateTmp=true
[Install]
WantedBy=multi-user.target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment