prometheus執行時更新config的方式

參考官方文件的教學如下:
https://prometheus.io/docs/prometheus/latest/configuration/configuration/

Prometheus can reload its configuration at runtime. If the new configuration is not well-formed, the changes will not be applied. A configuration reload is triggered by sending a SIGHUP to the Prometheus process or sending a HTTP POST request to the /-/reload endpoint (when the –web.enable-lifecycle flag is enabled). This will also reload any configured rule files.

而實際的應用方式則是:

  • 第一種,向prometheus進行發信號
  • 第二種,向prometheus發送HTTP請求

    但是會需要先設定--web.enable-lifecycle參數

發佈留言

發佈留言必須填寫的電子郵件地址不會公開。 必填欄位標示為 *