一、安装prometheus
下载prometheus:https://prometheus.io/download/
解压 prometheus-2.10.0.linux-amd64.tar.gz
[root@localhost ~]# tar xf prometheus-2.10.0.linux-amd64.tar.gz -C /usr/local/
1、创建Systemd服务启动prometheus
vi /etc/systemd/system/prometheus.service
[Unit]
Description=Prometheus
Documentation=https://prometheus.io/
After=network.target
[Service]
Type=simple
User=prometheus
ExecStart=/usr/local/prometheus/prometheus --config.file=/usr/local/prometheus/prometheus.yml
Restart=on-failure
[Install]
WantedBy=multi-user.target
2、启动/停止/自启动命令
systemctl start prometheus
systemctl status prometheus
systemctl enable prometheus
3、访问prometheusweb:
Prometheus自带有简单的UI,http://172.16.8.253:9090/
二、node_exporter安装及配置
1、下载及解压安装包
下载地址:
https://github.com/prometheus/node_exporter/releases/do