Prometheus + Grafana 实现钉钉告警

Prometheus + Grafana 实现钉钉报警

资源列表

操作系统 配置 主机名 IP
CentOS 7.9 2C2G prometheus 192.168.10.192
CentOS 7.9 2C2G grafana 192.168.10.193
CentOS 7.9 2C2G node 192.168.10.194
CentOS 7.9 2C2G alert 192.168.10.195
  • 所需安装包
Prometheus相关安装包都在github进行托管,而访问github时好时坏,
有条件的或使用GitHub镜像网站可以自行下载;没条件的可以通过下面链接进行下载:
Prometheus+Grafana.zip
https://url83.ctfile.com/f/33603683-606759914-012c3c?p=1942 (访问密码: 1942)

物料包

1 基础环境

  • 关闭防火墙
systemctl stop firewalld && systemctl disable firewalld
  • 关闭selinux
sed -i "s/^SELINUX=*/SELINUX=disabled/g" /etc/selinux/config
setenforce 0
  • 修改主机名,添加hosts解析
cat << EOF >> /etc/hosts
192.168.10.192 prometheus
192.168.10.193 grafana
192.168.10.194 node
192.168.10.195 alert
EOF

# 修改主机名
hostnamectl set-hostname grafana && su
hostnamectl set-hostname node && su
hostnamectl set-hostname alert && su
hostnamectl set-hostname prometheus && su
  • 时间同步
    这里很重要
systemctl restart chronyd
chronyc sources
# 检查时间
date

2 Prometheus节点部署prometheus

  • 上传prometheus源码包,并解压
tar zxf prometheus-2.26.0.linux-amd64.tar.gz 
mv prometheus-2.26.0.linux-amd6
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值