PrometheusモニタLinux
1345 ワード
環境
システム:CentOS 7.5ソフトウェア:node_exporter-0.16.0.linux-amd64.tar.gz
クライアント
# tar -xzvf node_exporter-0.16.0.linux-amd64.tar.gz
# mkdir /usr/local/prometheus
# mv node_exporter-0.16.0.linux-amd64 /usr/local/prometheus/node_exporter
# useradd prometheus
# chown -R prometheus:prometheus /usr/local/prometheus
# vim /usr/lib/systemd/system/node_exporter.service
[Unit]
Description=node_exporter
After=network.target
[Service]
Type=simple
User=prometheus
ExecStart=/usr/local/prometheus/node_exporter/node_exporter
Restart=on-failure
[Install]
WantedBy=multi-user.target
# systemctl enable node_exporter.service
# systemctl start node_exporter.service
Prometheusエンド
# vim /usr/local/prometheus/prometheus.yml
scrape_configs:
- job_name: 'linux'
static_configs:
- targets: ['10.10.10.1:9100']
# systemctl restart prometheus
Grafanaエンド
Create
-Import
をクリックし、dashboards id( 1860)