Created
September 7, 2021 08:37
-
-
Save onysko/e8ce5b45b31414bf20f45e6492441e08 to your computer and use it in GitHub Desktop.
Node Exporter (prometheus) debian install
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
# put your version instead of "1.2.2" | |
wget https://github.com/prometheus/node_exporter/releases/download/v1.2.2/node_exporter-1.2.2.linux-amd64.tar.gz && | |
tar xf node_exporter-1.2.2.linux-amd64.tar.gz && | |
cd node_exporter-1.2.2.linux-amd64/ && | |
cp node_exporter /usr/local/bin && | |
useradd --no-create-home --home-dir / --shell /bin/false node_exporter | |
echo '[Unit] | |
Description=Prometheus Node Exporter | |
After=network.target | |
[Service] | |
Type=simple | |
User=node_exporter | |
Group=node_exporter | |
ExecStart=/usr/local/bin/node_exporter | |
SyslogIdentifier=node_exporter | |
Restart=always | |
PrivateTmp=yes | |
ProtectHome=yes | |
NoNewPrivileges=yes | |
ProtectSystem=strict | |
ProtectControlGroups=true | |
ProtectKernelModules=true | |
ProtectKernelTunables=yes | |
[Install] | |
WantedBy=multi-user.target' > /etc/systemd/system/node_exporter.service && | |
systemctl daemon-reload && | |
systemctl start node_exporter && | |
systemctl status node_exporter |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment