60.Cloud/80.Kubernetes
kube-prometheus-stack 에서 별도 service monitor 사용
왕영주
2021. 2. 24. 16:00
Helm value에서 아래 값을 false로 바꿔줍니다. 해당 값이 true면 chart 통해서 생성된 monitor만 감지합니다.
## If true, a nil or {} value for prometheus.prometheusSpec.serviceMonitorSelector will cause the
## prometheus resource to be created with selectors based on values in the helm deployment,
## which will also match the servicemonitors created
##
serviceMonitorSelectorNilUsesHelmValues: false
이후 service monitor를 생성하면
root@yjwang0-k8s-01:~# kubectl get servicemonitors.monitoring.coreos.com
NAME AGE
postgres-exporter-prometheus-postgres-exporter 3h17m
자동으로 prometheus target이 추가됩니다.
반응형