I want to use an index in Elasticsearch as a data source in Grafana. But I can't query it and extract a specific field from it. I want to have only the data of the fields I want as output from among several fields in this data source, like an RDBMs where columns can be selected. in elasticsearch, By default, a GET request will return the whole document, as stored in the _source field. Individual fields can be requested by using the _source parameter. Multiple fields can be specified in a comma-separated list:
GET /website/blog/123?_source=title,text
But when I use this query in Grafana, nothing is displayed in the output.
timestamp: * AND _source=DTLS_MA
This query says to display only the DTLS_MA field values in the output for all days (Because each index document is used for a specific day. So I set the value of my timestamp column equal to * to fetch all the documents) The field DTLS_MA is a dictionary like below:
"DTLS_MA" : {
"IS_AVAILABLE" : true,
"VOICE_DIFF" : 0,
"VOICE_CNT" : 157720612,
"VSMS_DIFF" : null,
"VSMS_CNT" : null,
"SMS_DIFF" : 0,
"SMS_CNT" : 208672130,
"HSDP_DIFF" : null,
"HSDP_CNT" : null,
"GPRS_DIFF" : 0,
"GPRS_CNT" : 942823463,
"RBT_DIFF" : null,
"RBT_CNT" : null,
"CMN_DIFF" : null,
"CMN_CNT" : null,
"MVPN_DIFF" : null,
"MVPN_CNT" : null,
"MVPN_RTC_DIFF" : null,
"MVPN_RTC_CNT" : null,
"COMPOSITE_DIFF" : null,
"COMPOSITE_CNT" : null,
"MMS_DIFF" : null,
"MMS_CNT" : null
}