Describe the bug
When I am trying to display some fairly static metric, and/or some information label, I will often use a Grafana "table" or "stat" panel and set the Type to instant (on the assumption that it's going to generate a fair bit less load to just load the value at one point in time than whatever time range the dashboard would have selected).
However, when I do this, I have found that I'm often getting intermittent results. On some refreshes, the value loads fine; on others, I get "No data".
Here is an example of the query inspector returning "No data" for such a query:
{
"request": {
"url": "api/ds/query?ds_type=victoriametrics-metrics-datasource&requestId=SQR283",
"method": "POST",
"data": {
"queries": [
{
"editorMode": "code",
"exemplar": false,
"expr": "nvidia_device_count{job=\"nvidia-exporter\",instance=\"gpu0.rnd.int.ppd-ld5.gbr.internal.yoti.com\"}",
"format": "table",
"instant": true,
"legendFormat": "__auto",
"range": false,
"refId": "A",
"datasource": {
"type": "victoriametrics-metrics-datasource",
"uid": "afhs9qne1bd34c"
},
"queryType": "timeSeriesQuery",
"requestId": "29A",
"utcOffsetSec": 3600,
"interval": "",
"datasourceId": 3,
"intervalMs": 15000,
"maxDataPoints": 1250
}
],
"from": "1775133253235",
"to": "1775135053235"
},
"hideFromInspector": false
},
"response": {
"results": {
"A": {
"status": 200,
"frames": [],
"refId": "A"
}
}
}
}
To Reproduce
Create a "Stat" or "Table" panel with a query.
Set Type to instant.
Refresh over the course of several minutes and observe inconsistent results.
Here is an example panel:
{
"id": 29,
"type": "stat",
"title": "Number of cards",
"gridPos": {
"x": 0,
"y": 0,
"h": 4,
"w": 3
},
"fieldConfig": {
"defaults": {
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "text",
"value": null
}
]
},
"color": {
"mode": "thresholds"
}
},
"overrides": [
{
"matcher": {
"id": "byName",
"options": "Time"
},
"properties": []
},
{
"matcher": {
"id": "byName",
"options": "uuid"
},
"properties": [
{
"id": "displayName",
"value": "Device type"
}
]
},
{
"matcher": {
"id": "byName",
"options": "Value"
},
"properties": [
{
"id": "displayName",
"value": "Count"
}
]
}
]
},
"pluginVersion": "12.4.2",
"targets": [
{
"editorMode": "code",
"exemplar": false,
"expr": "nvidia_device_count{job=\"${job}\",instance=\"${instance}\"}",
"format": "table",
"instant": true,
"legendFormat": "__auto",
"range": false,
"refId": "A"
}
],
"datasource": {
"type": "victoriametrics-metrics-datasource",
"uid": "afhs9qne1bd34c"
},
"options": {
"reduceOptions": {
"values": false,
"calcs": [
"lastNotNull"
],
"fields": ""
},
"orientation": "auto",
"textMode": "auto",
"wideLayout": true,
"colorMode": "value",
"graphMode": "area",
"justifyMode": "auto",
"showPercentChange": false,
"percentChangeColorMode": "standard"
}
}
Versions of VictoriaMetrics datasource and VictoriaMetrics backend
- Grafana: v12.4.2
- datasource plugin: v0.23.3
- backend: 1.139.0
- vmauth: 1.139.0
Link to dashboard in VictoriaMetrics grafana playground
I created this dashboard: https://docs.victoriametrics.com/victoriametrics/sd_configs/#static_configs
but I was unable to reproduce the issue there.
Please provide dashboard JSON if it is possible
No response
Additional information
No response
Describe the bug
When I am trying to display some fairly static metric, and/or some information label, I will often use a Grafana "table" or "stat" panel and set the Type to instant (on the assumption that it's going to generate a fair bit less load to just load the value at one point in time than whatever time range the dashboard would have selected).
However, when I do this, I have found that I'm often getting intermittent results. On some refreshes, the value loads fine; on others, I get "No data".
Here is an example of the query inspector returning "No data" for such a query:
{ "request": { "url": "api/ds/query?ds_type=victoriametrics-metrics-datasource&requestId=SQR283", "method": "POST", "data": { "queries": [ { "editorMode": "code", "exemplar": false, "expr": "nvidia_device_count{job=\"nvidia-exporter\",instance=\"gpu0.rnd.int.ppd-ld5.gbr.internal.yoti.com\"}", "format": "table", "instant": true, "legendFormat": "__auto", "range": false, "refId": "A", "datasource": { "type": "victoriametrics-metrics-datasource", "uid": "afhs9qne1bd34c" }, "queryType": "timeSeriesQuery", "requestId": "29A", "utcOffsetSec": 3600, "interval": "", "datasourceId": 3, "intervalMs": 15000, "maxDataPoints": 1250 } ], "from": "1775133253235", "to": "1775135053235" }, "hideFromInspector": false }, "response": { "results": { "A": { "status": 200, "frames": [], "refId": "A" } } } }To Reproduce
Create a "Stat" or "Table" panel with a query.
Set Type to instant.
Refresh over the course of several minutes and observe inconsistent results.
Here is an example panel:
{ "id": 29, "type": "stat", "title": "Number of cards", "gridPos": { "x": 0, "y": 0, "h": 4, "w": 3 }, "fieldConfig": { "defaults": { "mappings": [], "thresholds": { "mode": "absolute", "steps": [ { "color": "text", "value": null } ] }, "color": { "mode": "thresholds" } }, "overrides": [ { "matcher": { "id": "byName", "options": "Time" }, "properties": [] }, { "matcher": { "id": "byName", "options": "uuid" }, "properties": [ { "id": "displayName", "value": "Device type" } ] }, { "matcher": { "id": "byName", "options": "Value" }, "properties": [ { "id": "displayName", "value": "Count" } ] } ] }, "pluginVersion": "12.4.2", "targets": [ { "editorMode": "code", "exemplar": false, "expr": "nvidia_device_count{job=\"${job}\",instance=\"${instance}\"}", "format": "table", "instant": true, "legendFormat": "__auto", "range": false, "refId": "A" } ], "datasource": { "type": "victoriametrics-metrics-datasource", "uid": "afhs9qne1bd34c" }, "options": { "reduceOptions": { "values": false, "calcs": [ "lastNotNull" ], "fields": "" }, "orientation": "auto", "textMode": "auto", "wideLayout": true, "colorMode": "value", "graphMode": "area", "justifyMode": "auto", "showPercentChange": false, "percentChangeColorMode": "standard" } }Versions of VictoriaMetrics datasource and VictoriaMetrics backend
Link to dashboard in VictoriaMetrics grafana playground
I created this dashboard: https://docs.victoriametrics.com/victoriametrics/sd_configs/#static_configs
but I was unable to reproduce the issue there.
Please provide dashboard JSON if it is possible
No response
Additional information
No response