add power and ups battery over time widgets to grafana [ci skip]

This commit is contained in:
Viktor Barzin 2025-03-22 15:46:17 +00:00
parent 529b07f849
commit 8eb18ec651

View file

@ -1261,46 +1261,92 @@
"type": "prometheus", "type": "prometheus",
"uid": "PBFA97CFB590B2093" "uid": "PBFA97CFB590B2093"
}, },
"description": "Battery Charge Remaining Expressed as a Percent of Full Charge",
"fieldConfig": { "fieldConfig": {
"defaults": { "defaults": {
"color": { "color": {
"mode": "thresholds" "mode": "palette-classic"
},
"custom": {
"axisBorderShow": false,
"axisCenteredZero": false,
"axisColorMode": "text",
"axisLabel": "",
"axisPlacement": "auto",
"barAlignment": 0,
"drawStyle": "line",
"fillOpacity": 0,
"gradientMode": "none",
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
},
"insertNulls": false,
"lineInterpolation": "linear",
"lineWidth": 1,
"pointSize": 5,
"scaleDistribution": {
"type": "linear"
},
"showPoints": "auto",
"spanNulls": false,
"stacking": {
"group": "A",
"mode": "none"
},
"thresholdsStyle": {
"mode": "off"
}
}, },
"mappings": [], "mappings": [],
"thresholds": { "thresholds": {
"mode": "percentage", "mode": "absolute",
"steps": [ "steps": [
{ {
"color": "green", "color": "green",
"value": null "value": null
},
{
"color": "semi-dark-red",
"value": 5
},
{
"color": "semi-dark-orange",
"value": 20
},
{
"color": "#EAB839",
"value": 50
},
{
"color": "green",
"value": 90
} }
] ]
}, },
"unit": "amp" "unit": "percent"
}, },
"overrides": [] "overrides": []
}, },
"gridPos": { "gridPos": {
"h": 5, "h": 5,
"w": 3, "w": 12,
"x": 21, "x": 0,
"y": 29 "y": 29
}, },
"id": 4, "id": 20,
"options": { "options": {
"minVizHeight": 75, "legend": {
"minVizWidth": 75, "calcs": [],
"orientation": "auto", "displayMode": "list",
"reduceOptions": { "placement": "bottom",
"calcs": [ "showLegend": true
"lastNotNull"
],
"fields": "",
"values": false
}, },
"showThresholdLabels": false, "tooltip": {
"showThresholdMarkers": true, "mode": "single",
"sizing": "auto" "sort": "none"
}
}, },
"pluginVersion": "11.1.0", "pluginVersion": "11.1.0",
"targets": [ "targets": [
@ -1311,7 +1357,7 @@
}, },
"disableTextWrap": false, "disableTextWrap": false,
"editorMode": "builder", "editorMode": "builder",
"expr": "ups_upsBatteryCurrent / 1000000000", "expr": "ups_upsEstimatedChargeRemaining",
"fullMetaSearch": false, "fullMetaSearch": false,
"includeNullMetadata": true, "includeNullMetadata": true,
"instant": false, "instant": false,
@ -1321,8 +1367,117 @@
"useBackend": false "useBackend": false
} }
], ],
"title": "Battery Current", "title": "Battery Remaining",
"type": "gauge" "type": "timeseries"
},
{
"datasource": {
"type": "prometheus",
"uid": "PBFA97CFB590B2093"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"axisBorderShow": false,
"axisCenteredZero": false,
"axisColorMode": "text",
"axisLabel": "",
"axisPlacement": "auto",
"barAlignment": 0,
"drawStyle": "line",
"fillOpacity": 0,
"gradientMode": "none",
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
},
"insertNulls": false,
"lineInterpolation": "linear",
"lineWidth": 1,
"pointSize": 5,
"scaleDistribution": {
"type": "linear"
},
"showPoints": "auto",
"spanNulls": false,
"stacking": {
"group": "A",
"mode": "none"
},
"thresholdsStyle": {
"mode": "off"
}
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "red",
"value": null
},
{
"color": "orange",
"value": 10
},
{
"color": "yellow",
"value": 30
},
{
"color": "green",
"value": 60
}
]
},
"unit": "m"
},
"overrides": []
},
"gridPos": {
"h": 5,
"w": 12,
"x": 12,
"y": 29
},
"id": 21,
"options": {
"legend": {
"calcs": [],
"displayMode": "list",
"placement": "bottom",
"showLegend": true
},
"tooltip": {
"mode": "single",
"sort": "none"
}
},
"pluginVersion": "11.1.0",
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "PBFA97CFB590B2093"
},
"disableTextWrap": false,
"editorMode": "builder",
"expr": "ups_upsEstimatedMinutesRemaining",
"fullMetaSearch": false,
"includeNullMetadata": true,
"instant": false,
"legendFormat": "__auto",
"range": true,
"refId": "A",
"useBackend": false
}
],
"title": "Time Until Battery Depletion",
"type": "timeseries"
} }
], ],
"refresh": "5s", "refresh": "5s",
@ -1332,13 +1487,13 @@
"list": [] "list": []
}, },
"time": { "time": {
"from": "now-1h", "from": "now-2d",
"to": "now" "to": "now"
}, },
"timepicker": {}, "timepicker": {},
"timezone": "browser", "timezone": "browser",
"title": "Huawei UPS 2000", "title": "Huawei UPS 2000",
"uid": "ee70yskqw5u68f", "uid": "ee70yskqw5u68f",
"version": 16, "version": 19,
"weekStart": "" "weekStart": ""
} }