Hi everone,
I’ll try to describe my problem as structured as possible.
What I’m using:
- grafana 7.5 (but got the same issue in 8.3.3)
- elasticsearch 7.9.0
- elasticsearch index with the following mapping of field
ID
:
"abcdefghijklmnop" : {
"mappings" : {
"properties" : {
"ID" : {
"type" : "keyword"
},...
- an indexed document with the field
ID
:
"_index" : "abcdefghijklmnop",
"_type" : "_doc",
"_id" : "2022-01-07 11:53:40_2",
"_score" : 1.0,
"_source" : {
"ID" : "2022-01-07 11:53:40_2",
"startTime" : "2022-01-11 09:53:56+0100",
"endTime" : "2022-01-11 09:59:29+0100",
"type" : "Analysis"
}
What I want to achieve:
- Create a variable that contains all values of the field
ID
in all documents in the given index. - So with the example document above, the variable should contain “2022-01-07 11:53:40_2”
What I tried:
- Create a Query-Variable with the following settings:
Problem:
- The variable does not contain anything, as you see in the Preview section of the image above.
Notes:
- A Query-Variable like
{"find":"fields", "type":"keyword"}
works as expected and gives me all fields that were mapped as keywords:
- Removing the
query
part does not effect the result.
I googled the whole day and tried to use the examples and solutions of other threads, but nothing worked. I’m very thankfull for any advice.
Thanks in advance