elastic_exporters连接启用https的uri失败



在尝试运行elastic_export以收集prometheus的度量信息时,我得到了以下错误。我们最近启用了HTTPs uri,之后它失败了。我正在运行以下命令:

./elasticsearch_exporter --es.uri="https://<user>:<password>@<host>:9200" --es.ca="ca.p12" --es.all

错误:

level=info ts=2021-09-09T20:40:27.595324951Z caller=clusterinfo.go:200 msg="triggering initial cluster info call"
level=info ts=2021-09-09T20:40:27.595501321Z caller=clusterinfo.go:169 msg="providing consumers with updated cluster info label"
level=error ts=2021-09-09T20:40:27.60841784Z caller=clusterinfo.go:253 msg="failed to get cluster info" err="Get https://<host>:9200/: x509: certificate signed by unknown authority"
level=error ts=2021-09-09T20:40:27.608495036Z caller=clusterinfo.go:174 msg="failed to retrieve cluster info from ES" err="Get https://<host>:9200/: x509: certificate signed by unknown authority"
level=info ts=2021-09-09T20:40:37.59553964Z caller=main.go:153 msg="initial cluster info call timed out"
level=info ts=2021-09-09T20:40:37.595914448Z caller=main.go:188 msg="starting elasticsearch_exporter" addr=:9114
level=warn ts=2021-09-09T20:40:42.095358641Z caller=cluster_health.go:270 msg="failed to fetch and decode cluster health" err="failed to get cluster health from https://rc-esd701.dev.local:9200/_cluster/health: Get https://<host>:9200/_cluster/health: x509: certificate signed by unknown authority"
level=warn ts=2021-09-09T20:40:42.095358638Z caller=nodes.go:1851 msg="failed to fetch and decode node stats" err="failed to get cluster health from https://<host>:9200_nodes/_local/stats: Get https://<host>:9200/_nodes/_local/stats: x509: certificate signed by unknown authority"

这个错误可以通过在

命令中添加--es.ssl-skip-verify来修复

最新更新