how to take Configmap changes effectvie?

34 views
Skip to first unread message

nina guo

unread,
Apr 15, 2021, 3:28:52 AM4/15/21
to Prometheus Users
I made some changes on Prometheus Configmap, the only way is to restart the POD. But if we restart, the data will be lost totally. So is it other way to take Confimap changes effective?

Stuart Clark

unread,
Apr 15, 2021, 3:31:26 AM4/15/21
to nina guo, Prometheus Users
On 15/04/2021 08:28, nina guo wrote:
> I made some changes on Prometheus Configmap, the only way is to
> restart the POD. But if we restart, the data will be lost totally. So
> is it other way to take Confimap changes effective? --

If you have it enabled there is the reload mechanism:
https://prometheus.io/docs/prometheus/latest/management_api/#reload

--
Stuart Clark

Message has been deleted
Message has been deleted

nina guo

unread,
Apr 15, 2021, 4:33:42 AM4/15/21
to Prometheus Users
Thank you very much. I will try.

nina guo

unread,
Apr 16, 2021, 4:29:16 AM4/16/21
to Prometheus Users
Prometheus is deployed in a k8s cluster.
I added relabel config to Prometheus Configmap.
I tried the reload mechanism, but it hasn't taken effect immediately.
- --web.enable-lifecycle has been added to Prometheus deployment yaml file.
- curl -X POST http://localhost:9090/-/reload to reload the changes.(how to curl if the connection is with a jumphost?)
I checked on the prometheus POD(etc/prometheus/prometheus.yml), it has updated with the latest value. But on Prometheus GUI, it is still the old one.

On Thursday, April 15, 2021 at 3:31:26 PM UTC+8 Stuart Clark wrote:
Reply all
Reply to author
Forward
0 new messages