prometheus服务发现

Consul简介

◼ 一款基于golang开发的开源工具,主要面向分布式,服务化的系统提供服务注册、服务发现和配置管理

的功能

◼ 提供服务注册/发现、健康检查、Key/Value存储、多数据中心和分布式一致性保证等功能

部署

bash 复制代码
curl -LO https://releases.hashicorp.com/consul/1.16.2/consul_1.16.2_linux_amd64.zip

unzip  consul_1.16.2_linux_amd64.zip



mv consul /usr/local/bin
consul agent -dev -ui -data-dir=/consul/data/ \
-config-dir=/etc/consul/ -client=0.0.0.0

访问

http://120.77.146.92:8500/

bash 复制代码
root@server01:/consul/data# vi /etc/consul/nodes.json 

{
"service": {
"id": "node_exporter",
"name": "node01",
"address": "172.29.21.67",
"port": 9100,
"tags": ["nodes"],
"checks": [{
"http": "http://172.29.21.67:9100/metrics",
"interval": "5s"
}]
}
}

基于consnl的服务发现

修改prometheus配置文件

注释file_sd_configs段

添加consul_sd_configs段

查看prometheus

之前labels的os标签没有了,这个是基于consnl发现的

相关推荐
云游2 天前
大模型性能指标的监控系统(prometheus3.5.0)和可视化工具(grafana12.1.0)基础篇
grafana·prometheus·可视化·监控
qq_232045573 天前
非容器方式安装Prometheus和Grafana,以及nginx配置访问Grafana
nginx·grafana·prometheus
夜莺云原生监控3 天前
Prometheus 监控 Kubernetes Cluster 最新极简教程
容器·kubernetes·prometheus
SRETalk4 天前
Prometheus 监控 Kubernetes Cluster 最新极简教程
kubernetes·prometheus
川石课堂软件测试4 天前
JMeter并发测试与多进程测试
功能测试·jmeter·docker·容器·kubernetes·单元测试·prometheus
SRETalk5 天前
夜莺监控的几种架构模式详解
prometheus·victoriametrics·nightingale·夜莺监控
Ditglu.6 天前
使用Prometheus + Grafana + node_exporter实现Linux服务器性能监控
服务器·grafana·prometheus
SRETalk6 天前
监控系统如何选型:Zabbix vs Prometheus
zabbix·prometheus
睡觉z6 天前
云原生环境Prometheus企业级监控
云原生·prometheus
归梧谣6 天前
云原生环境 Prometheus 企业级监控实战
云原生·prometheus