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发现的

相关推荐
夜月yeyue8 小时前
SOME/IP-SD 服务发现故障
网络·单片机·网络协议·tcp/ip·安全·服务发现
.柒宇.2 天前
运维常见面试题_07_配置管理与监控(Ansible · Prometheus · Alertmanager)· 容器编排(Kubernetes)
运维·k8s·ansible·prometheus
玉&心3 天前
在grafana中引入prometheus的数据监控
grafana·prometheus
Dovis(誓平步青云)4 天前
从Redis指标采集到异常告警:redis_exporter + Prometheus 完整实战
服务器·数据库·人工智能·redis·架构·prometheus·vibe coding
吉甫作诵5 天前
Prometheus 安装配置:Consul 自动发现与 Thanos Sidecar 持久化
prometheus·consul
溜达的大象6 天前
Prometheus怎么监控没有公网IP的服务器?Node Exporter远程采集实战
服务器·tcp/ip·prometheus
测试狗科研平台8 天前
从实验室到量产:测试狗新材料中试的技术路径与平台支撑
测试工具·服务发现·材料工程
八角Z8 天前
AI Agent作为经济参与者的兴起:机器经济与传统金融体系的并存与交织
大数据·人工智能·服务发现
Livia要学习11 天前
Prometheus架构解析
prometheus
云烟成雨TD12 天前
Micrometer 系列【63】统一观测:基于 Spring Boot 的生产级演示案例 | 基于 OTLP 集成 Prometheus + Jaeger
spring boot·云原生·prometheus