我需要在度量中添加特定的标签,这样grafana就可以根据其值进行筛选。我想知道是否有办法在ServiceMonitor中这样做,这样我就不需要修改我的springboot项目中的代码了。
发布于 2022-07-08 18:24:32
我的最后一个解决方案是在metricRelabelings中的端点下添加一个ServiceMonitor。
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
...
spec:
...
endpoints:
- ...
metricRelabelings:
- separator: ;
regex: (.*)
targetLabel: LABLE_NAME
replacement: VALUE
action: replacehttps://stackoverflow.com/questions/72650651
复制相似问题