【发布时间】:2021-11-15 16:42:40
【问题描述】:
我正在使用 grafana 仪表板版本 Grafana v8.1.3 (a61f38238c) 。我正在尝试使用 apanel 保存仪表板。当我尝试保存仪表板时,出现以下错误。
db 查询错误:错误 1054:“字段列表”中的“时间”列未知
{
"id": 2,
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 0
},
"type": "gauge",
"title": "Panel Title",
"datasource": "MySQL-test",
"pluginVersion": "8.1.3",
"fieldConfig": {
"defaults": {
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
},
"mappings": [],
"color": {
"mode": "thresholds"
}
},
"overrides": []
},
"options": {
"reduceOptions": {
"values": false,
"calcs": [
"lastNotNull"
],
"fields": ""
},
"showThresholdLabels": false,
"showThresholdMarkers": true,
"text": {}
},
"targets": [
{
"format": "time_series",
"group": [],
"metricColumn": "none",
"rawQuery": false,
"rawSql": "SELECT \r\n NOW() AS \"time\", \r\n name AS metric, \r\n salary as value \r\nFROM demosales \r\nORDER BY empid\r\n",
"refId": "A",
"select": [
[
{
"params": [
"empid"
],
"type": "column"
}
]
],
"table": "demosales",
"timeColumn": "time",
"where": []
}
]
}
是否需要任何特殊的字符串转义?错误是在保存仪表板时。
【问题讨论】:
标签: mysql grafana grafana-variable