Prometheus服务环境搭建
- 首先我们需要准备3台服务器:
初始化服务器
IP地址、hostName主机名称、绑定Hosts文件、时间同步(非常重要)
服务器名 |
IP |
主机名称 |
描述 |
promrtheus服务器 |
192.168.31.10 |
promrtheus.jus.cn |
|
被监控(agent)服务器 |
192.168.31.11 |
agent.jus.cn |
LB、Web01/Web02、MySql01/MySql02… |
grafana服务器 |
192.168.31.12 |
grafana.jus.cn |
运维成像==>数据转换为图形 |
- IP地址设置(针对虚拟机,实体机忽略):
BOOTPROTO=static/none
ipaddr=192.168.31.10
ipaddr=192.168.31.11
ipaddr=192.168.31.12
修改UUID编号的后三位
- HOSTNAME设置(可不设置):
hostnamectl set-hostname prometheus.jus.cn
hostnamectl set-hostname agent.jus.cn
hostnamectl set-hostname grafana.jus.cn
- /etc/hosts文件(