Hello everyone,
I am trying to plot two time series in Grafana reading the data from Elasticsearch.
The structure of my document is the following:
{
"sensorName": "Sensor1",
"values": [
{
"feature": {
"key": "feature1",
"value": 67
}
},
{
"feature": {
"key": "feature2",
"value": 15
}
}
],
"timestamp": 1631519919904
}
I want to plot one time series for the values in the first element of the array (the one with “key”=“feature1”) and another time series for the second element of the array (“key”=“feature2”).
I tried the group by operation on the field values.feature.key but it doesn’t work because Grafana averages the two values (the two fields values.feature.value) for each timestep.
How can I fix the visualization?
Thank you for your help.