vault backup: 2025-05-19 10:58:25
This commit is contained in:
@@ -22,3 +22,40 @@ ljuJdjh5ljuJdjh5
|
||||
```
|
||||
|
||||
|
||||
node exporter install
|
||||
```
|
||||
mkdir /etc/node_exporter
|
||||
|
||||
cat <<EOF > /etc/node_exporter/config.yml
|
||||
basic_auth_users:
|
||||
prometheus: "\$2a\$12\$9fI6ZRV.1FAIRbqH9TnwgOSyCrQ18yMC0AoYcwErYmTD97sfJjMq2"
|
||||
EOF
|
||||
|
||||
wget https://github.com/prometheus/node_exporter/releases/download/v1.9.1/node_exporter-1.9.1.linux-amd64.tar.gz
|
||||
tar -xvf node_exporter-*.tar.gz
|
||||
sudo mv node_exporter-1.9.1.linux-amd64/node_exporter /usr/local/bin/
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
rm -rf node_*
|
||||
|
||||
cat <<EOF > /etc/systemd/system/node_exporter.service
|
||||
[Unit]
|
||||
Description=Node Exporter
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
User=root
|
||||
ExecStart=/usr/local/bin/node_exporter --web.config.file="/etc/node_exporter/config.yml"
|
||||
Restart=always
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
EOF
|
||||
|
||||
systemctl enable --now node_exporter
|
||||
systemctl start node_exporter
|
||||
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user