Closed Aldjinn closed 2 months ago
I see the difference. It may be that something has changed in the variables in Grafana that is also different from the other dashboards.
You cannot select the FritzBox - it only shows "None".
That's correct, @falke9176. The FritzBox is not selectable.
The backend error from Grafana might be more helpful. Unfortunately I do not have any Flux query knowledge to fix it myself.
grafana-server[1449775]: logger=tsdb.influx_flux endpoint=queryData pluginId=influxdb dsName="InfluxDB FritzBox" dsUID=wUjJE6-4z uname=admin t=2024-07-03T12:19:17.16378475+02:00 level=warn msg="Flux query failed" err="invalid: error in building plan while starting program: cannot query an empty range" query="from(bucket: \"fritzbox\")\n |> range(start: 1970-01-01T00:00:00Z, stop: 1970-01-01T00:00:00Z)\n |> filter(fn: (r) => r._measurement == \"fritzbox\" and r._field == \"linkuptime\")\n |> keyValues(keyColumns: [\"box\"])\n |> group()\n |> keep(columns: [\"box\"])\n |> distinct(column: \"box\")"
I am also unsure if the invalid query is from the dashboard variable settings (boxtag) or from one of the panels.
That's the query in the dashboard:
from(bucket: v.defaultBucket)
|> range(start: v.timeRangeStart, stop: v.timeRangeStop)
|> filter(fn: (r) => r._measurement == "$measurement" and r._field == "linkuptime")
|> keyValues(keyColumns: ["box"])
|> group()
|> keep(columns: ["box"])
|> distinct(column: "box")
Something is wrong with getting the value for the variable boxtag
f.e. this is the JSON Code of Table "FritzBox Info":
from(bucket: v.defaultBucket)
|> range(start: -1d)
|> filter(fn: (r) => r._measurement == "${measurement}" and r.box == "${boxtag}" and
(
r._field == "external_ip" or
r._field == "external_ipv6" or
r._field == "ipv6_prefix" or
r._field == "ipv6_prefix_length" or
r._field == "model" or
r._field == "serialnumber" or
r._field == "softwareversion" or
r._field == "last_auth_error" or
r._field == "myfritz_host_name"
)
)
|> last()
|> toString()
|> drop(columns: ["box", "_measurement", "_start", "_stop", "_time"])
|> map(fn: (r) => ({
r with _field:
if r._field == "external_ip" then "IPv4"
else if r._field == "external_ipv6" then "IPv6"
else if r._field == "ipv6_prefix" then "IPv6 Prefix"
else if r._field == "ipv6_prefix_length" then "IPv6 Prefix Length"
else if r._field == "model" then "Model"
else if r._field == "serialnumber" then "Serial"
else if r._field == "softwareversion" then "SW Version"
else if r._field == "last_auth_error" then "Last Auth Error"
else if r._field == "myfritz_host_name" then "MyFritz Hostname"
else r._field
})
)
and the Query Inspector of Grafana for that panel shows this:
from(bucket: "fritzbox")
|> range(start: -1d)
|> filter(fn: (r) => r._measurement == "fritzbox" and r.box == "" and
(
r._field == "external_ip" or
r._field == "external_ipv6" or
r._field == "ipv6_prefix" or
r._field == "ipv6_prefix_length" or
r._field == "model" or
r._field == "serialnumber" or
r._field == "softwareversion" or
r._field == "last_auth_error" or
r._field == "myfritz_host_name"
)
)
|> last()
|> toString()
|> drop(columns: ["box", "_measurement", "_start", "_stop", "_time"])
|> map(fn: (r) => ({
r with _field:
if r._field == "external_ip" then "IPv4"
else if r._field == "external_ipv6" then "IPv6"
else if r._field == "ipv6_prefix" then "IPv6 Prefix"
else if r._field == "ipv6_prefix_length" then "IPv6 Prefix Length"
else if r._field == "model" then "Model"
else if r._field == "serialnumber" then "Serial"
else if r._field == "softwareversion" then "SW Version"
else if r._field == "last_auth_error" then "Last Auth Error"
else if r._field == "myfritz_host_name" then "MyFritz Hostname"
else r._field
})
)
So I changed the "boxtag" to the right Boxname-Value - and all tables of this dashboard are shown the results.
mmmhh I'm not so deep fit in Grafana .......
Hi, Seems like Grafana broke the dashboard again. Have you tried reimporting it. This worked in the past.
Yes, I already tried to reimport it. But unfortunately without success.
In the other dashboards, "fritz.box" is also not shown, only the option "all":
I tried adding all to the variable in the FRITZ!Box Router Status dashboard, but no values are shown:
Hello all, I had the same problem and found one working solution for me. Open the FRITZ!Box Router Status Dashboard, go to Dashboard Settings, then Settings-Variables and edit the boxtag Variable. Scroll down to Select Options and select Include All option and write in the field Custom all value: fritz.box Then Run query and Apply After this when you open the Dashboard again, it will automatically load it.
I currently don't have access to an influxdb 2 instance. Can someone take the influx query for the variable and run it in the influxdb 2 UI? If it works there then Grafana might have an issue.
I had the same problem after upgrading Grafana. This is a Grafana problem with InfluxDB. It was introduced in Grafana 11.1. A fix is ready, but I think a new version was not released yet.
@joos2k, great finding, thank you.
I tried to upgrade to Grafana 11.1 and it wouldn't even show a login prompt anymore, so I had to downgrade to 10 again. 🤷♂️
There's a know bug in Grafana itself. Until it's fixed you can change the Variable boxtag query by yourself to following:
from(bucket: v.defaultBucket) |> range(start: ${from:date}, stop: ${to:date}) |> filter(fn: (r) => r._measurement == "$measurement" and r._field == "linkuptime") |> keyValues(keyColumns: ["box"]) |> group() |> keep(columns: ["box"]) |> distinct(column: "box")
A fixed Grafana version has now been released. This problem no longer occurs for me with Grafana 11.1.1.
Nice, I can confirm that the dashboard is running fine with Grafana v11.1.1.
Great. Thank you for reporting back.
Then Inwill close this issue.
Hey, I've been using your project for a long time now without any issues, many thanks for that.
But after upgrading my Grafana to v11.1.0, the FRITZ!Box Router Status dashboard seems to be broken. The other three ones are still working fine.
Grafana v10.4.5:
Grafana v11.1.0:
I'm not sure if the issue could related to this, because the other three still working dashboards show it as well.
I've tested with Firefox 127.0.2 and Edge 126.0.2592.81, both show the same behavior.