代码之家  ›  专栏  ›  技术社区  ›  Ivan Aracki DavidO

普罗米修斯如何通过身份验证来获取Spring-Boot度量?

  •  0
  • Ivan Aracki DavidO  · 技术社区  · 6 年前

    我使用的是Spring Boot 1.5.1和:

    compile 'io.micrometer:micrometer-spring-legacy:1.0.6'
    compile 'io.micrometer:micrometer-registry-prometheus:1.0.6'
    

    management.security.enabled=true
    endpoints.prometheus.enabled=true
    endpoints.prometheus.sensitive=false
    

    在我的普罗米修斯配置文件中,我添加了基本身份验证:

    basic_auth:
        username: username
        password: passw0rd
    

    服务器返回HTTP状态403

    普罗米修斯验证Spring度量的每一个擦痕的正确方法是什么?

    我可以用这个命令通过Spring Security:

    curl --cookie "SESSION=7f18cfe7-9a54-4fcf-9662-21d81247c705" http://localhost:8082/management/metrics
    

    阿法依 prometheus config file 基本身份验证 持票人 . 标题没有其他选项。

    0 回复  |  直到 6 年前