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

相关推荐
麦兜*3 天前
Spring Boot 应用 Docker 监控:Prometheus + Grafana 全方位监控
spring boot·后端·spring cloud·docker·prometheus
罗不俷4 天前
Prometheus 详解:从原理到实战,打造企业级云原生监控体系
云原生·prometheus
Deamon Tree6 天前
Prometheus和Grafana简介
grafana·prometheus
2501_938790076 天前
Spring Cloud Alibaba 2023 版:Nacos 服务发现与 Sentinel 限流的整合方案
sentinel·服务发现
码界奇点6 天前
Apache IoTDB 架构特性与 PrometheusGrafana 监控体系部署实践
架构·apache·grafana·prometheus·iotdb
Linux-palpitate6 天前
基于Prometheus和Grafana的MySQL监控,服务器监控
服务器·grafana·prometheus
hello_2507 天前
golang程序对接prometheus
开发语言·golang·prometheus
angushine8 天前
Docker方式安装Prometheus+Grafana+Node Exporter
docker·grafana·prometheus
SRETalk10 天前
夜莺监控设计思考(三)时序库、agent 的一些设计考量
prometheus·可观测性·监控告警·nightingale·opentelemetry·夜莺监控·categraf
Zz_waiting.10 天前
服务注册 / 服务发现 - Nacos
nacos·服务发现·1024程序员节