Prometheus服务发现

限定服务发现端口

Kuberenetes SD scrapes all service ports, not just the one annotated #2507 提到的问题我似乎也遇到了, prometheus 自动发现的端口多于我期望的 metrics 端口。解决方法可以采用正则表达式

参考