Created
September 29, 2024 16:56
-
-
Save deanet/990987ab466f6785aba46aecdaaf6e85 to your computer and use it in GitHub Desktop.
Rocky8
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
#!/bin/bash | |
#install node exporter | |
cd /usr/src/ | |
wget -c "https://github.com/prometheus/node_exporter/releases/download/v1.8.2/node_exporter-1.8.2.linux-amd64.tar.gz" | |
tar -xvf node_exporter-1.8.2.linux-amd64.tar.gz | |
cd node_exporter-1.8.2.linux-amd64/; | |
mv node_exporter /usr/local/bin/ | |
echo ' | |
[Unit] | |
Description=Node Exporter | |
Wants=network-online.target | |
After=network-online.target | |
[Service] | |
Type=simple | |
User=node_exporter | |
Group=node_exporter | |
ExecStart=/usr/local/bin/node_exporter | |
[Install] | |
WantedBy=multi-user.target' > /etc/systemd/system/node_exporter.service | |
systemctl daemon-reload | |
systemctl enable node_exporter | |
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