简体   繁体   English

无法使用grafana cloud访问elasticsearch的数据源

[英]Cannot access data source of elasticsearch using grafana cloud

I'm using grafana cloud for creating visualization but when i'm trying to load the data source with elasticsearch i'm getting 502 error.我正在使用 grafana cloud 来创建可视化,但是当我尝试使用 elasticsearch 加载数据源时,我收到了 502 错误。 502错误

502 usually means bad gateway (there is no connection) and that IP address looks like an internal IP address. 502 通常意味着坏网关(没有连接)并且该 IP 地址看起来像一个内部 IP 地址。 GrafanaCloud is a cloud service so it does not have access to internal IP addresses. GrafanaCloud 是一项云服务,因此它无法访问内部 IP 地址。

Your options are:您的选择是:

  1. Install Grafana locally if you do not want to open up anything over the internet.如果您不想通过互联网打开任何东西,请在本地安装 Grafana。
  2. Use direct mode instead of proxy mode.使用直接模式而不是代理模式。 This means that requests will go directly from your browser to the elasticsearch server and not go through the Grafana backend server.这意味着请求将直接从您的浏览器发送到 elasticsearch 服务器,而不是通过 Grafana 后端服务器。 However, GrafanaCloud is on https so you will get a mixed content warning and you would need to solve that by having a proxy in front of your elasticsearch server (or by setting up https for your server).但是,GrafanaCloud 在 https 上,因此您将收到混合内容警告,您需要通过在您的 elasticsearch 服务器前面设置代理(或为您的服务器设置 https)来解决该问题。
  3. Make your server accessible over the internet.使您的服务器可通过 Internet 访问。 Setup a static IP address for your elasticsearch server, setup firewall rules etc. so that GrafanaCloud can query your server.为您的 elasticsearch 服务器设置静态 IP 地址,设置防火墙规则等,以便 GrafanaCloud 可以查询您的服务器。

Add the following configurations in config/elasticsearch.yml :config/elasticsearch.yml添加以下配置:

transport.host: localhost 
transport.tcp.port: 9300 
http.port: 9200
network.host: 0.0.0.0

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 带有Elasticsearch数据源的Grafana - Grafana with elasticsearch data source 如何使用 Elasticsearch 数据源在 Grafana 中可视化百分比指标? - How to visualize a percentage metric in Grafana using Elasticsearch data source? 使用Grafana中的模板并以Elasticsearch作为数据源的术语聚合 - Term aggregation using template in Grafana with Elasticsearch as data source 如何使用Grafana中的Prometheus数据源监视弹性搜索 - How to monitor elasticsearch with Prometheus data source in Grafana 带有AWS Elasticsearch数据源的Grafana在phantomjs中不起作用 - Grafana with aws elasticsearch data source not working in phantomjs 使用 Elasticsearch 数据源的 Grafana 中没有可用的指标 - No metrics available in Grafana with Elasticsearch data source 从 Elasticsearch 数据源获取 Grafana 中的最新元素 - Get most recent element in Grafana from an Elasticsearch data source Grafana 在 Elasticsearch 数据源中使用两个字段相减 - Grafana to use substraction of two fields in Elasticsearch data source Grafana将聚集用于Elasticsearch数据源的两个字段总和 - Grafana to use aggregration for total of two field sums of Elasticsearch data source 如何使用 Elasticsearch 数据源在 Grafana 中使用非时间序列数据 label x 轴? - How to label x-axis with non-time series data in Grafana with Elasticsearch data source?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM