
Prometheus和Grafana用来监控服务器Prometheus官网地址“https://prometheus.io/”下载Prometheus安装包cd /root/ wget https://github.com/prometheus/prometheus/releases/download/v3.10.0/prometheus-3.10.0.linux-arm64.tar.gz解压并Prometheus安装包将目录放在/usr/local/下tar -zxvf /root/prometheus-*.tar.gz -C /usr/local/ cd /usr/local/ mv prometheus-*/ prometheus启动进程打开网页cd /usr/local/prometheus/ sudo ./prometheus --config.fileprometheus.yml启动一些示例目标wget https://github.com/prometheus/node_exporter/releases/download/v1.10.2/node_exporter-1.10.2.linux-arm64.tar.gz tar -zxvf node_exporter-*.tar.gz -C /usr/local/ cd /usr/local/node_exporter* ./node_exporter --web.listen-address 127.0.0.1:8080 ./node_exporter --web.listen-address 127.0.0.1:8081 ./node_exporter --web.listen-address 127.0.0.1:8082配置 Prometheus 来监控示例目标sudo cp /usr/local/prometheus/prometheus.yml /usr/local/prometheus/prometheus.yml.bak sudo vim /usr/local/prometheus/prometheus.yml安装GrafanaGrafana官网https://grafana.com/下载安装Grafanasudo apt-get install -y adduser libfontconfig1 musl wget https://dl.grafana.com/grafana-enterprise/release/12.4.1/grafana-enterprise_12.4.1_22846628243_linux_arm64.deb sudo dpkg -i grafana-enterprise_12.4.1_22846628243_linux_arm64.deb安装完成后启动服务sudo systemctl daemon-reload sudo systemctl start grafana-server sudo systemctl status grafana-server sudo systemctl enable grafana-server.service打开网页账号密码默认:admin更改默认语言添加数据源收工