简体   繁体   English

Grafana 未从本地 Elastic Search 加载数据

[英]Grafana is not loading data from local Elastic Search

I was recently introduced to Elastic Search (ES) and Grafana.我最近了解了 Elastic Search (ES) 和 Grafana。 I have to make a Grafana dashboard to display data from Elastic Search.我必须制作一个 Grafana 仪表板来显示来自 Elastic Search 的数据。

I installed ES locally, created the index the same way it was created in a production server.我在本地安装了 ES,创建索引的方式与在生产服务器中创建的方式相同。 I also inserted some documents for testing.我还插入了一些文件进行测试。 Then I installed Grafana locally as well and added two datasources: a remote ES instance we have and my local ES instance as well.然后我也在本地安装了 Grafana 并添加了两个数据源:我们拥有的远程 ES 实例和我的本地 ES 实例。

Then I started with a very basic query just to show a table listing a single property.然后我从一个非常基本的查询开始,只是为了显示一个列出单个属性的表。 This query works and returns data in the remote server , but it does not work when I change the database to my local server.此查询有效并返回远程服务器中的数据,但当我将数据库更改为本地服务器时它不起作用。

As I'm pretty new to this stack I don't even know what kind of information would be useful to help me, so I'm pasting below the content of the query inspector.由于我对这个堆栈很陌生,我什至不知道什么样的信息对我有用,所以我粘贴在查询检查器的内容下方。 Also my question is if someone has tips on what could be causing it and tips to solve.另外我的问题是,是否有人对可能导致它的原因和解决方法有提示。

Thanks for any help谢谢你的帮助

{
   "xhrStatus":"complete",
   "request":{
      "method":"POST",
      "url":"api/datasources/proxy/1/_msearch?max_concurrent_shard_requests=5",
      "data":"{\"search_type\":\"query_then_fetch\",\"ignore_unavailable\":true,\"index\":\"event_tracking_3\"}\n{\"size\":0,\"query\":{\"bool\":{\"filter\":[{\"range\":{\"datetime\":{\"gte\":\"1579083211126\",\"lte\":\"1579104811127\",\"format\":\"epoch_millis\"}}},{\"query_string\":{\"analyze_wildcard\":true,\"query\":\"*\"}}]}},\"aggs\":{\"2\":{\"terms\":{\"field\":\"type.keyword\",\"size\":10,\"order\":{\"_key\":\"desc\"},\"min_doc_count\":1},\"aggs\":{}}}}\n"
   },
   "response":{
      "took":1,
      "responses":[
         {
            "took":1,
            "timed_out":false,
            "_shards":{
               "total":1,
               "successful":1,
               "skipped":0,
               "failed":0
            },
            "hits":{
               "total":{
                  "value":0,
                  "relation":"eq"
               },
               "max_score":null,
               "hits":[

               ]
            },
            "aggregations":{
               "2":{
                  "doc_count_error_upper_bound":0,
                  "sum_other_doc_count":0,
                  "buckets":[

                  ]
               }
            },
            "status":200
         }
      ],
      "$$config":{
         "method":"POST",
         "url":"api/datasources/proxy/1/_msearch?max_concurrent_shard_requests=5",
         "data":"{\"search_type\":\"query_then_fetch\",\"ignore_unavailable\":true,\"index\":\"event_tracking_3\"}\n{\"size\":0,\"query\":{\"bool\":{\"filter\":[{\"range\":{\"datetime\":{\"gte\":\"1579083211126\",\"lte\":\"1579104811127\",\"format\":\"epoch_millis\"}}},{\"query_string\":{\"analyze_wildcard\":true,\"query\":\"*\"}}]}},\"aggs\":{\"2\":{\"terms\":{\"field\":\"type.keyword\",\"size\":10,\"order\":{\"_key\":\"desc\"},\"min_doc_count\":1},\"aggs\":{}}}}\n"
      }
   }
}

Forget it =] It's the time range of the query.算了 =] 这是查询的时间范围。 I'm answering just to be useful to someone else facing the same "issue".我的回答只是为了对面临同样“问题”的其他人有用。

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM