diff --git a/dashboard.json b/dashboard.json index 6c6386b..f10060d 100644 --- a/dashboard.json +++ b/dashboard.json @@ -426,7 +426,7 @@ "type": "special" } ], - "max": 41.2, + "max": 100, "min": 0, "thresholds": { "mode": "absolute", @@ -456,7 +456,7 @@ "gridPos": { "h": 4, "w": 2, - "x": 17, + "x": 16, "y": 0 }, "id": 18, @@ -571,7 +571,7 @@ "gridPos": { "h": 4, "w": 2, - "x": 19, + "x": 18, "y": 0 }, "id": 9, @@ -636,7 +636,7 @@ "tags": [] } ], - "title": "UPS Battery Volts", + "title": "Battery Volts", "type": "gauge" }, { @@ -660,7 +660,126 @@ "type": "special" } ], - "max": 41.2, + "max": 100, + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "#d44a3a", + "value": null + }, + { + "color": "dark-red", + "value": 0 + }, + { + "color": "orange", + "value": 30 + }, + { + "color": "dark-green", + "value": 70 + } + ] + }, + "unit": "percent" + }, + "overrides": [] + }, + "gridPos": { + "h": 4, + "w": 2, + "x": 20, + "y": 0 + }, + "id": 22, + "maxDataPoints": 100, + "options": { + "minVizHeight": 75, + "minVizWidth": 75, + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "/^upsEBatteryEstimatedChargeRemaining$/", + "values": false + }, + "showThresholdLabels": false, + "showThresholdMarkers": true, + "sizing": "auto" + }, + "pluginVersion": "11.0.0", + "targets": [ + { + "alias": "$col", + "datasource": { + "type": "influxdb", + "uid": "ddp38pe3t92wwc" + }, + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "synoSystem", + "orderByTime": "ASC", + "policy": "default", + "query": "from(bucket: \"ups\")\r\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\r\n |> filter(fn: (r) => r[\"_measurement\"] == \"ups_data\")\r\n |> filter(fn: (r) => r[\"_field\"] == \"upsEBatteryEstimatedChargeRemaining\" ) \r\n |> map(fn: (r) => ({\r\n _time: r._time,\r\n _value: \r\n if r[\"_field\"] == \"upsEBatteryEstimatedChargeRemaining\" then float(v: r._value) \r\n else float(v: r._value),\r\n _field: r._field,\r\n _measurement: r._measurement\r\n }))\r\n |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)\r\n |> yield(name: \"mean\")\r\n", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "upsBatteryCharge" + ], + "type": "field" + }, + { + "params": [], + "type": "last" + } + ] + ], + "tags": [] + } + ], + "title": "Battery Charge", + "type": "gauge" + }, + { + "datasource": { + "type": "influxdb", + "uid": "ddp38pe3t92wwc" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [ + { + "options": { + "match": "null", + "result": { + "text": "N/A" + } + }, + "type": "special" + } + ], + "max": 100, "min": 0, "thresholds": { "mode": "absolute", @@ -690,7 +809,7 @@ "gridPos": { "h": 4, "w": 2, - "x": 21, + "x": 22, "y": 0 }, "id": 21, @@ -1285,6 +1404,6 @@ "timezone": "browser", "title": "UPS", "uid": "be5qevsfuwc8we", - "version": 28, + "version": 32, "weekStart": "" } \ No newline at end of file diff --git a/img/preview.png b/img/preview.png index ac96a18..a43dcda 100644 Binary files a/img/preview.png and b/img/preview.png differ