How to change web.listen-address of statefulset.apps/prometheus-user-workload

Latest response

Hi,
In order to use costom metrics in HPA, I found the document: https://docs.openshift.com/container-platform/4.6/monitoring/exposing-custom-application-metrics-for-autoscaling.html.

Obviously, the configuration of prometheus-url is wrong in the document:
--prometheus-url=http://prometheus-operated.default.svc:9090/

Because from statefulset.apps/prometheus-user-workload in Namespace openshift-user-workload-monitoring, we can see, prometheus just listen 127.0.0.1:9090 port, as below:
--web.listen-address=127.0.0.1:9090

I tried to change it to 0.0.0.0:9090, but it will automatically restore. so who can help me?

Thanks

Responses

It's hardcode in the statefullset go program.