CentOS7 安装部署prometheus + grafana 监控

本文详细介绍了如何在CentOS7上安装并配置Prometheus和Grafana监控系统。首先,下载并启动Prometheus,然后安装node_exporter以收集节点信息。接着,配置Prometheus以拉取节点数据。最后,下载并安装Grafana,启动服务,并使用默认管理员账户登录,完成监控系统的搭建。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

一、安装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
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值