Hi, i"m trying to use influx2 / flux with grafana for some dashboards. One should display the available diskspace and the total diskspace of a filesystem on linux/raspi.
I found on the internet a query for this, but it’s not working. seems the multiplication doesnt have any effect on the chart:
has someone an idea?
from(bucket: "raspi")
|> range(start: v.timeRangeStart, stop: v.timeRangeStop)
|> filter(fn: (r) => r["_measurement"] == "hrStorageTable")
|> filter(fn: (r) => r["_field"] == "hrStorageAllocationUnits" or r["_field"] == "hrStorageSize" or r["_field"] == "hrStorageUsed")
|> filter(fn: (r) => r["agent_host"] == "h1netpi")
|> filter(fn: (r) => r["hrStorageDescr"] == "/" )
|> map(fn: (r) => ({
r with
"hrStorageSize": r["hrStorageSize"] / 1024.0 * r["hrStorageAllocationUnits"],
"hrStorageUsed": r["hrStorageUsed"] / 1024.0 * r["hrStorageAllocationUnits"],
}))
|> drop(columns: ["hrStorageAllocationUnits"])
|> drop(columns: ["hrStorageDescr"])