ServiceDiscovery

概述

参考:

Service Discovery(服务发现)

Nacos

参考:

发现、配置和管理微服务

Consul

参考:

注册

curl --location --request PUT 'http://10.10.4.90:8500/v1/agent/service/register' \
--header 'Content-Type: application/json' \
--data-raw '{
    "id": "10.10.11.16",
    "name": "node-exporter",
    "address": "10.10.11.16",
    "port": 9100,
    "tags": [
        "linux"
    ],
    "Meta": {
        "custom_house_name": "天津机房",
        "business_type": "迎检"
    }
}'

利用服务的 Meta 在 Prometheus 进行 consul_sd 时添加 Lable


最后修改 March 12, 2025: powershell. github (0e836fc7)