The open and composable observability and data visualization platform. Visualize metrics, logs, and traces from multiple sources like Prometheus, Loki, Elasticsearch, InfluxDB, Postgres and many more.
Would be very nice to have a possibility to define _source for elasticsearch plugin when Metric: Raw Data & Visualization Table is being used.
Currently _source can not be defined within Lucene query itself because it is outside of it.
Why is this needed:
For presenting, retrieving from elasticsearch only these _doc fields which are defined in Grafana and not all raw data _doc fields.
Testing:
Current Grafana query:
request:Object
url:"api/datasources/proxy/28/_msearch"
method:"POST"
data:"{"search_type":"query_then_fetch","ignore_unavailable":true,"index":"","max_concurrent_shard_requests":256}
{"size":500,"query":{"bool":{"filter":[{"range":{"@timestamp":{"gte":1621491369329,"lte":1621577769330,"format":"epoch_millis"}}},{"query_string":{"analyze_wildcard":true,"query":"_index:myindex-* AND State:\"OPEN\""}}]}},"sort":[{"@timestamp":{"order":"desc","unmapped_type":"boolean"}},{"_doc":{"order":"desc"}}],"script_fields":{}}
"
Modified Grafana query tested on elasticsearch by adding "_source":"State":
POST _msearch
{"search_type":"query_then_fetch","ignore_unavailable":true,"index":"","max_concurrent_shard_requests":256}
{"size":500,"query":{"bool":{"filter":[{"range":{"@timestamp":{"gte":1621491369329,"lte":1621577769330,"format":"epoch_millis"}}},{"query_string":{"analyze_wildcard":true,"query":"_index:myindex-* AND State:\"OPEN\""}}]}},"_source":"State","sort":[{"@timestamp":{"order":"desc","unmapped_type":"boolean"}},{"_doc":{"order":"desc"}}],"script_fields":{}}
Hi,
What would you like to be added:
Would be very nice to have a possibility to define
_source
for elasticsearch plugin when Metric: Raw Data & Visualization Table is being used. Currently_source
can not be defined within Lucene query itself because it is outside of it.Why is this needed:
For presenting, retrieving from elasticsearch only these _doc fields which are defined in Grafana and not all raw data _doc fields.
Testing:
Current Grafana query:
Response from ELK:
Modified Grafana query tested on elasticsearch by adding
"_source":"State"
:Response from ELK:
Thanks