Skip to content

Instantly share code, notes, and snippets.

@Gromina
Last active September 5, 2019 21:37
Show Gist options
  • Save Gromina/92584629a7d3beec20d050e5edec1ed6 to your computer and use it in GitHub Desktop.
Save Gromina/92584629a7d3beec20d050e5edec1ed6 to your computer and use it in GitHub Desktop.
node_exporter install
# https://devopscube.com/monitor-linux-servers-prometheus-node-exporter/
# https://github.com/prometheus/node_exporter/releases/
curl -LO https://github.com/prometheus/node_exporter/releases/download/v0.18.1/node_exporter-0.18.1.linux-amd64.tar.gz
tar -xvf node_exporter-0.18.1.linux-amd64.tar.gz
sudo mv node_exporter-0.18.1.linux-amd64/node_exporter /usr/local/bin/
sudo useradd -rs /bin/false node_exporter
sudo vi /etc/systemd/system/node_exporter.service
sudo systemctl daemon-reload
sudo systemctl start node_exporter
sudo systemctl status node_exporter
sudo systemctl enable node_exporter
# http://<server-IP>:9100/metrics
- job_name: 'node_exporter_metrics'
scrape_interval: 5s
static_configs:
- targets: ['10.142.0.3:9100']
[Unit]
Description=Node Exporter
After=network.target
[Service]
User=node_exporter
Group=node_exporter
Type=simple
ExecStart=/usr/local/bin/node_exporter
[Install]
WantedBy=multi-user.target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment