Refresh ServiceMonitors #1437
-
Hi, I've deployed the helm-prometheus-stack, and then deployed a ServiceMonitor, but it doesn't show up as a target in prometheus - it only shows if I reinstall the whole stack. Am I doing something wrong here? I was under the impression that the prom-operator should pick up the changes and then roll out some new config for my Prometheus pods. For info, I've added the "release: " label that I believe we need for it to be picked up, and I'm not overriding any of the default settings in my values.yaml other than HTTPS configuration for Prometheus. Thanks, |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
We don't provide helm chart as it lives in https://github.com/prometheus-community/helm-charts/tree/main/charts/kube-prometheus-stack. I recommend the following:
|
Beta Was this translation helpful? Give feedback.
-
Perfect, thanks. It was picked up in service-discovery and the port regex was wrong so no target was generated. Thanks! |
Beta Was this translation helpful? Give feedback.
We don't provide helm chart as it lives in https://github.com/prometheus-community/helm-charts/tree/main/charts/kube-prometheus-stack.
I recommend the following:
/service-discovery
and check if your service is present there. If it is then ServiceMonitor was picked up and the issue is with incorrectly selected port inendpoints
field/service-discovery
then check what is the value ofserviceMonitorSelector
field in yourPrometheus
object and adjusting ServiceMonitor labels accordingly. Value of{}
selects all serviceMonitors.