Not able to get query working under variables with datasource as elasticsearch

Grafana v10.0.3, ES v 8.8.1

i m trying to create new variable for frontend(HAPROXY)

query : { “find”: “terms”, “field”: “haproxy.frontend_name” } – > No result

query: { "“find”: “terms”, “field”: “agent.name”} → sucess

On dev tools when i try below query

GET logs-haproxy*/_search
{
“size”: 0,
“aggs”: {
“unique_frontend_names”: {
“terms”: {
“field”: “haproxy.frontend_name”,
“size”: 10 // adjust this to retrieve as many terms as you need
}
}
}
}

i get

{
“took”: 1147,
“timed_out”: false,
“_shards”: {
“total”: 2,
“successful”: 2,
“skipped”: 0,
“failed”: 0
},
“hits”: {
“total”: {
“value”: 10000,
“relation”: “gte”
},
“max_score”: null,
“hits”:
},
“aggregations”: {
“unique_frontend_names”: {
“doc_count_error_upper_bound”: 0,
“sum_other_doc_count”: 3350,
“buckets”: [
{
“key”: “fe_haproxy-chat_80”,
“doc_count”: 39472465
},
{
“key”: “fe_haproxy-prd-service_8080”,
“doc_count”: 32282083
},
{
“key”: “fe_haproxy-stg-service_8080”,
“doc_count”: 1308373
},
{
“key”: “fe_haproxy-prd-service_80”,
“doc_count”: 849292
},
{
“key”: “fe_haproxy-stg-service_80”,
“doc_count”: 127236
},
{
“key”: “fe_haproxy-prd-service_443~”,
“doc_count”: 96227
},
{
“key”: “fe_haproxy-stg-service_443~”,
“doc_count”: 93037
},
{
“key”: “fe_haproxy-dev-service_80”,
“doc_count”: 49656
},
{
“key”: “prometheus”,
“doc_count”: 13273
},
{
“key”: “fe_haproxy-dev-service_443~”,
“doc_count”: 7884
}
]
}
}

can you please advice why i m not able to use it in variables?

Close this