運(yùn)行 node_exporter ,可以用容器運(yùn)行:
docker run -d
--net="host"
--pid="host"
-v "/:/host:ro,rslave"
quay.io/prometheus/node-exporter
--path.rootfs /host
二進(jìn)制安裝:
wget https://github.com/prometheus/node_exporter/releases/download/v/node_exporter-.-amd64.tar.gz
tar xvfz node_exporter-.-amd64.tar.gz
cd node_exporter-.*-amd64
./node_exporter
監(jiān)控指標(biāo)頁(yè)面 (http://localhost:9100/metrics)
prometheus 添加配置:
scrape_configs:
- job_name: 'node'
static_configs:- targets: ['localhost:9100']