po220
May 1, 2025, 3:05pm
1
Hello,
I have a gauge built with the JSON below that has been working for several weeks and is now displaying “no data” even though the query still returns data.
json of gauge ;
{
“id”: 6,
“type”: “gauge”,
“title”: “P instant”,
“description”: “”,
“gridPos”: {
“x”: 0,
“y”: 0,
“h”: 8,
“w”: 4
},
“fieldConfig”: {
“defaults”: {
“mappings”: ,
“thresholds”: {
“mode”: “percentage”,
“steps”: [
{
“color”: “green”,
“value”: null
},
{
“color”: “orange”,
“value”: 10
},
{
“color”: “red”,
“value”: 90
}
]
},
“color”: {
“mode”: “thresholds”
},
“fieldMinMax”: false,
“max”: 12000,
“min”: 0,
“unit”: “watt”
},
“overrides”:
},
“pluginVersion”: “11.6.0”,
“targets”: [
{
“datasource”: {
“type”: “influxdb”,
“uid”: “deibiuyk6gclj4f”
},
“hide”: false,
“query”: “from(bucket: "Energie_Modbus")\r\n |> range(start: -1h)\r\n |> filter(fn: (r) => r._measurement == "modbus")\r\n |> filter(fn: (r) => r._field == "general_P_W")\r\n |> last()”,
“refId”: “A”
}
],
“datasource”: {
“type”: “influxdb”,
“uid”: “deibiuyk6gclj4f”
},
“options”: {
“reduceOptions”: {
“values”: true,
“calcs”: [
“lastNotNull”
],
“fields”: “/^general_P_W \{host="6ce315a4uoi9afb", name="Elec_Gen", slave_id="1", type="input_register"\}$/”
},
“orientation”: “auto”,
“showThresholdLabels”: false,
“showThresholdMarkers”: true,
“sizing”: “auto”,
“minVizWidth”: 75,
“minVizHeight”: 75
}
}
What’s going on?
Thanks in advance
I recommend reviewing the official Grafana documentation on Transform Data . It helps clarify how transformations and field filters behave in different panels.
Hint: Try experimenting with the reduceOptions -> fields
property.
po220
May 4, 2025, 9:10am
3
Hello
Thanks for your answer
I wasn’t using transformation on this panel, and my question is that this panel worked fine, and without modifying the data source and with the data still present, without updating Grafana, it now displays “No data.”.
I just tested with a group and simplified requete (no “last”)
"targets": [
{
"datasource": {
"type": "influxdb",
"uid": "deibvbk6gclj4f"
},
"hide": false,
"query": "from(bucket: \"Energie_Modbus\")\r\n |> range(start: -1h)\r\n |> filter(fn: (r) => r._measurement == \"modbus\")\r\n |> filter(fn: (r) => r._field == \"general_P_W\")\r\n",
"refId": "A"
}
],
"datasource": {
"type": "influxdb",
"uid": "deibvbk6gclj4f"
},
"options": {
"reduceOptions": {
"values": true,
"calcs": [
"lastNotNull"
],
"fields": "/^general_P_W \\{host=\"6ce315a49afb\", name=\"Elec_Gen\", slave_id=\"1\", type=\"input_register\"\\}$/"
},
It always gives me the same thing : The data is there but the panel shows “No data”
With or without transformation it has the same behavior
po220
May 4, 2025, 9:24am
4
My panel came back on with this modification.
before : Value options->Show all values (with last in query)
Now : Value options ->Show calculate-> Fields (the only good one).
It works with or without Last() in query
but I don’t know how long it will work since I don’t know why it broke down.