Closed BBdong closed 1 year ago
内网的ip是因为你使用nacos注册是内网ip,这个可以设置
第二个告警不是服务的名称,这个应该和你的配置有关系
其实就是想要这个效果(见图) , 目前这个项目拉取的服务注册到Prometheus默认labels下只有job和instance(默认是ip+端口)
如果是给注册的微服务动态打自定义标签目前还不支持 如图中的registerProjectName标签。 后续在告警时 可以使用诸如registerProjectName自定义标签去做一些事情
我的做法是在Service类增加 Map<String, String> meta , 然后把自定义标签放到meta 中 , 然后再prometheus.yml中增加配置 relabel_configs
如果可以我提交pull request, 加一些代码然后在READ.ME增加配置说明
可以,欢迎
我合并了,等有时间我更新一下版本
这个不错
拉取微服务的lebles下的instance标签默认是内网ip+端口(见图),后续alertmanager 告警通知只能获取当前服务的instance标签和job标签,获取不到当前告警服务的名称