Parcourir la source

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

疯狂的狮子Li il y a 1 an
Parent
commit
52559f1aad
1 fichiers modifiés avec 8 ajouts et 0 suppressions
  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