Преглед изворни кода

update 优化 prometheus http sd发现支持配置账号密码鉴权

疯狂的狮子Li пре 1 година
родитељ
комит
52559f1aad
1 измењених фајлова са 8 додато и 0 уклоњено
  1. 8 0
      docker/prometheus/prometheus.yml

+ 8 - 0
docker/prometheus/prometheus.yml

@@ -38,5 +38,13 @@ scrape_configs:
     scrape_timeout: 10s
     metrics_path: /actuator/prometheus
     scheme: http
+    # monitor 监控的账号密码
+    basic_auth:
+      username: ruoyi
+      password: 123456
     http_sd_configs:
       - url: 'http://127.0.0.1:9100/actuator/prometheus/sd'
+        # monitor 监控的账号密码
+        basic_auth:
+          username: ruoyi
+          password: 123456