浏览代码

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