I’m using Grafana to access data in an influxdb database. The graphs for data in the form of floats and ints is working very well. Now, I’m trying to graph a time series of daylight hours (duration) in the form of a string as HH:MM:SS. So far I have had no luck.
This is my query from the query inspector:
{
“xhrStatus”: “complete”,
“request”: {
“method”: “GET”,
“url”: “api/datasources/proxy/3/query”,
“params”: {
“db”: “hass”,
“q”: “SELECT "state" FROM "variable.daylight" WHERE time >= now() - 7d”,
“epoch”: “ms”
},
“data”: null,
“precision”: “ms”
},
“response”: {
“results”: [
{
“statement_id”: 0,
“series”: [
{
“name”: “variable.daylight”,
“columns”: [
“time”,
“state”
],
“values”: [
[
1576476000161,
“10:01:16”
],
[
1576562400082,
“10:01:00”
],
[
1576648800116,
“10:00:45”
],
[
1576685180034,
“10:00:45”
],
[
1576735200049,
“10:00:35”
]
]
}
]
}
]
}
}
or in screenshot form:
That results in no data displayed in the graph. If I take the query and paste it into influx, I get this:
InfluxDB shell version: 1.7.6
Enter an InfluxQL query
> use hass
Using database hass
> SELECT "state" FROM "variable.daylight" WHERE time >= now() - 7d
name: variable.daylight
time state
---- -----
1576476000161782016 10:01:16
1576562400082861824 10:01:00
1576648800116229120 10:00:45
1576685180034132992 10:00:45
1576735200049216000 10:00:35
which tells me that the data is there, I just need to get the query right in Grafana. Can anyone see what I’m doing wrong?