由于证书不匹配,Prometheus 与 StorageGRID 集成失败
适用于
- StorageGRID
- Prometheus
问题描述
- 将外部 Prometheus 与 NetApp StorageGRID 集成时,无法检索指标。
- 在 Prometheus GUI 中观察到的错误消息:
Error scraping target: Get "https://[target-url]/federate?match%5B%5D=%7B__name__%3D~%22alertmanager_.%2A%7Ccassandra_.%2A%7Cnode_.%2A%7Cstoragegrid_.%2A%22%7D": tls: failed to verify certificate: x509: certificate is not valid for any names, but wanted to match [target-url]
- 通过指定相应的证书测试通过
curl的连接时,结果显示The SSL certificate error
示例:
[root@localhost ~]# curl https://xxxx:9091/federate -v --cert /etc/prometheus/cert/certificate.pem --key /etc/prometheus/cert/private_key.pem --cacert /etc/prometheus/cert/ca_certificate.pem* Trying x.x.x.x:9091......<body><center><h1>400 Bad Request</h1></center><center>The SSL certificate error</center><hr><center>nginx</center></body>