Grafana 可以通过 https 与 InfluxDB 通信吗?

Can Grafana communicate with InfluxDB over https?

我有一个工作设置,其中 Grafana 通过 http 连接到 InfluxDB 数据源。我想通过使用 https 来保护 Grafana 和 InfluxDB 之间的通信。我在 InfluxDB 配置中启用了 https,并且可以通过 URL https://<domain_name>.com:8086 连接到 InfluxDB 实例。但是,在 Grafana 中配置 https URL 时,连接测试失败。好像 Grafana 无法通过 https 连接。

非常感谢您的建议。

我找到了解决问题的方法。

由于这是测试服务器,我使用自签名证书配置了 HTTPS(另请参阅 Enabling HTTPS with InfluxDB,第 "Set up HTTPS with a self-signed certificate" 部分)。

如果证书是由不受信任的机构颁发的,Grafana 似乎会抛出 Network Error: Bad Gateway(502) 消息。

我按照以下指南将自签名证书安装为根证书解决了这个问题:How do I install a root certificate?。请注意,不建议将此用于生产系统。