Hello
Query type variable always shows “None” and is not usable.
Grafana: 7.0.6
Elasticsearch: 7.8.0
OS: Centos 7
Browser: chrome 83
ES Index mapping:
{
"test-idx" : {
"mappings" : {
"dynamic" : "strict",
"properties" : {
"@timestamp" : {
"type" : "date"
},
"id" : {
"type" : "keyword"
},
"node" : {
"type" : "keyword"
}
}
}
}
}
Sample ES docs
{
"@timestamp": 1594952848,
"id": "1",
"node": "aaa"
}
{
"@timestamp": 1594952948,
"id": "2",
"node": "bbb"
}
Grafana dashboard variable
Name: node
Type: Query
Query: {“find”: “terms”, “field”: “node”}
Preview of Values: None. What could be the problem?
terms aggregation from ES works without any issue:
GET test-idx/_search
{
"size": 0,
"aggs": {
"by_node": {
"terms": {
"field": "node"
}
}
}
}
Result
"aggregations" : {
"by_node" : {
"doc_count_error_upper_bound" : 0,
"sum_other_doc_count" : 0,
"buckets" : [
{
"key" : "aaa",
"doc_count" : 1
},
{
"key" : "bbb",
"doc_count" : 1
}
]
}
}