Last active
March 22, 2018 04:09
-
-
Save saitoxu/f306aa1461f602b07138ee27f91df726 to your computer and use it in GitHub Desktop.
how to install node_exporter (CentOS 7.4)
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
$ 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 |
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
OPTIONS= |
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
[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