categraf http_response 模块监控 https 协议的url, 报错 x509: certificate signed by unknown authority

Viewed 75

categraf http_response 模块监控 https 协议的url, 报错 x509: certificate signed by unknown authority

添加 insecure_skip_verify = true 也没有作用

我这里有类似域名的的其他url ,是能正常检测,如何正确配置跳过域名证书检测

配置如下

  • flashcatcloud/categraf:v0.3.38
    [[instances]]
    targets = ["https://xx.xx.com/"]
    labels = { env="test", instance="test-xx"}
    use_tls = false
    insecure_skip_verify = false
1 Answers

配置贴一下呢,是不是这里没改 use_tls = false

use_tls 改成true呢,我理解这个配置代表是否使用tls的配置,https://github.com/flashcatcloud/categraf/blob/main/pkg/tls/config.go#L41

是的, 成功跳过证书了
配置说明不清晰,还是得看源码