centos安装普罗米修斯和Grafana

安装普罗米修斯(以下地址无法打开,请联系1065588611@qq.com,索要最新ip地址)

mkdir prometheus
cd prometheus
wget  http://2v7740o742.vicp.fun:2024/upload/2024/02/2gu5npn0ocif8rdb8ioqbihq8o.gz
mv 2gu5npn0ocif8rdb8ioqbihq8o.gz  prometheus.tar.gz
tar -zxvf prometheus.tar.gz
cp -R prometheus-2.45.3.linux-amd64 /usr/local/prometheus

  

vim /usr/lib/systemd/system/prometheus.service

[Unit]
Description=Prometheus
Documentation=https://prometheus.io/
After=network.target

[Service]
Type=simple
User=root
WorkingDirectory=/usr/local/prometheus
ExecStart=/usr/local/prometheus/prometheus 
Restart=on-failure

[Install]
WantedBy=multi-user.target

  

启动服务和设置开机自动启动
systemctl daemon-reload
systemctl enable prometheus.service
systemctl start prometheus.service

  页面输入http://47.100.61.43:9090/targets?search=,效果图如下所示

 安装 Grafana

mkdir Grafana
cd Grafana
wget http://2v7740o742.vicp.fun:2024/upload/2024/02/6teeejrvjog95ooba760ftdaeu.rpm

mv 6teeejrvjog95ooba760ftdaeu.rpm  grafana.rpm

yum install -y grafana.rpm


systemctl enable grafana-server
systemctl start grafana-server

启动后,可以使用 systemctl status grafana-server 命令查看状态,出现下图界面,表示启动成功


在浏览器访问地址:http://47.100.61.43:3000/,出现下图界面,说明 Grafana 已经安装成功了

  

 

默认账号和密码是admin/admin

打开后的页面

 安装 node_exporter

mkdir node_exporter
cd node_exporter
wget  http://2v7740o742.vicp.fun:2024/upload/2024/03/vndi0t81nehffok4fp0uaj6924.gz
mv  vndi0t81nehffok4fp0uaj6924.gz  node_exporter-1.6.1.linux-amd64.tar.gz
tar -zxvf node_exporter-1.6.1.linux-amd64.tar.gz
cp -R node_exporter-1.6.1.linux-amd64 /usr/local/node_exporter

  vim /usr/lib/systemd/system/node_exporter.service

[Unit]
Description=node_exporter
After=network.target

[Service]
Type=simple
User=root
ExecStart=/usr/local/node_exporter/node_exporter
Restart=on-failure

[Install]
WantedBy=multi-user.target

  

设置开机自动启动

systemctl daemon-reload
systemctl enable node_exporter.service
systemctl start node_exporter.service

打开页面
http://47.100.61.43:9100/

  

 

posted @ 2024-03-06 18:04  不忘初心2021  阅读(20)  评论(0编辑  收藏  举报