I am trying to visualize some data in Grafana that I get from Elasicsearch.
I was able to add the data source and I am able to visualize simple things like the count time series for an index.
What I am not able to do is:
- Group by successfully. I am trying to group by with “Terms” and selecting a keyword field (a keyword text field with name structure .keyword).
As soon as I do this, I get “No data” on my Grafana panel.
I also tried to copy the query from Query Inspector > Object > request > data (removing the first json with “search_type” and “index”, and taking the second, which contains the actual query in Query DSL for Elasticsearch) and to use it to make a GET request to elasticsearch.
When I do this, it works and returns the aggregated values. Unfortunately I am not able to edit the query in Grafana, nor to understand fully the additional fields that I find when opening the Query Inspector, nor to understand why specifying terms in the Group by UI gives me no data.
- Understand what are the current capabilities of querying Elasticsearch through Grafana. I tried to input something with Lucene syntax in the open text field “Query” and I get some values. But I am not able to put there queries written in Query DSL (jsons) there. And I am struggling to find a decent guide with some examples that can help me understanding how to use this.
For example I am not able to answer simple questions like: “Is it possible to aggregate/group by using the Query field?”, “Are the Query field and the Metric + Group by fields 2 orthogonal ways to query data? Or can/should they be used together to structure a query?”.
Thank you in advance for your help.
[I am running Grafana 6.7.3 and Elasticsearch 7.7]