Prometheus分布式监控
一、概述 prometheus安装在阿里云上面,监控节点在公司内部机房,2个网络直接是不互通的。 环境说明 阿里云服务器: 操作系统:centos 7.6 数量:1台 公司内部服务器 操作系统:centos 7.6 数量:1台 拓扑图 说明: 1. 公司内部服务器安装node-exporter插件,收集主机信息,通过调用curl命令,将收集的数据以POST方式发送给Pushgateway 2. Pushgateway负责接收数据 3. Prometheus从Pushgateway中拉取数据,结合Grafana做数据展示。 二、部署操作 阿里云服务器 Prometheus和Pushgateway,是直接docker部署的。具体安装操作,请参考链接: https://www.cnblogs.com/xiao987334176/p/9930517.html https://www.cnblogs.com/xiao987334176/p/9933963.html 这里重点要说明的是Prometheus配置Pushgateway时,必须要加一个参数 honor_labels: true - job_name: ' pushgateway ' honor_labels: true static_configs: - targets: [ ' 172.18.156.172:9091 ' ]