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

相关推荐
鱼饼6号5 小时前
Prometheus 上手指南
linux·运维·centos·prometheus
Alone80461 天前
prometheus概念
prometheus
研究司马懿3 天前
【云原生监控】Prometheus监控系统
云原生·prometheus·监控系统·promesql·企业级监控·二进制部署
研究司马懿3 天前
【云原生监控】Prometheus之PushGateway
云原生·prometheus·云原生监控·企业级监控系统·promesql
Aray12344 天前
Using Prometheus+Grafana+VMware-exporter to monitor VMware EXSi Hosts and VMs
grafana·prometheus
一瓢一瓢的饮 alanchan4 天前
【运维监控】系列文章汇总索引
java·运维·kafka·grafana·prometheus·influxdb·运维监控
MarkHD5 天前
Prometheus+grafana+kafka_exporter监控kafka运行情况
kafka·grafana·prometheus
MarkHD5 天前
Prometheus+grafana监控flink运行情况
flink·grafana·prometheus
MarkHD5 天前
Prometheus+grafana监控spring boot 3运行情况
spring boot·grafana·prometheus
中标智研(深圳)5 天前
国家标准审查阶段需要注意的有哪些?还有什么其他要求?
服务发现·业界资讯