Using 52.1.0 of the kube-prometheus-stack what is the correct way to get metrics running in other namespaces.
I have a windows-exporter running on port 5000 named metrics under a different namespace and I've followed many blogs / guides etc but none seem to have done the trick of getting the metrics collected.
Are there some docs on how to do this? Or a way to debug why its not being picked up?
I have this in my values.yaml but it doesn't seem to be enough to find the endpoint which I'm assuming is because my target is running in a sidecar container in a different namespace to where my prometheus stack is running.
prometheus:
enabled: true
additionalServiceMonitors:
- name: "prometheus-windows-pod-exporter-monitor"
selector:
matchLabels:
appType: web
endpoints:
- port: "metrics"
From this document:
You can try adding namespaces in ServiceMonitor.
For more information you can follow this document.