302 lines
8.1 KiB
JSON
Executable File
302 lines
8.1 KiB
JSON
Executable File
{
|
|
"title": "UPS (NUT)",
|
|
"uid": "jallen-nut",
|
|
"schemaVersion": 38,
|
|
"version": 1,
|
|
"refresh": "30s",
|
|
"time": { "from": "now-3h", "to": "now" },
|
|
"templating": {
|
|
"list": [
|
|
{
|
|
"name": "datasource",
|
|
"type": "datasource",
|
|
"query": "prometheus",
|
|
"current": {},
|
|
"hide": 0,
|
|
"includeAll": false,
|
|
"label": "Datasource"
|
|
},
|
|
{
|
|
"name": "ups",
|
|
"type": "query",
|
|
"datasource": { "type": "prometheus", "uid": "$datasource" },
|
|
"query": "label_values(network_ups_tools_ups_status, ups)",
|
|
"refresh": 2,
|
|
"includeAll": false,
|
|
"label": "UPS"
|
|
}
|
|
]
|
|
},
|
|
"panels": [
|
|
{
|
|
"id": 1,
|
|
"type": "stat",
|
|
"title": "Status",
|
|
"gridPos": { "x": 0, "y": 0, "w": 4, "h": 4 },
|
|
"options": {
|
|
"reduceOptions": { "calcs": ["lastNotNull"] },
|
|
"colorMode": "background",
|
|
"textMode": "value"
|
|
},
|
|
"fieldConfig": {
|
|
"defaults": {
|
|
"mappings": [
|
|
{ "type": "value", "options": { "1": { "text": "OL", "color": "green" } } },
|
|
{ "type": "value", "options": { "0": { "text": "OB", "color": "red" } } }
|
|
],
|
|
"thresholds": {
|
|
"mode": "absolute",
|
|
"steps": [
|
|
{ "color": "red", "value": null },
|
|
{ "color": "green", "value": 1 }
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"targets": [
|
|
{
|
|
"expr": "network_ups_tools_ups_status{ups=\"$ups\"}",
|
|
"legendFormat": "Status",
|
|
"datasource": { "type": "prometheus", "uid": "$datasource" }
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"id": 2,
|
|
"type": "gauge",
|
|
"title": "Battery Charge",
|
|
"gridPos": { "x": 4, "y": 0, "w": 4, "h": 4 },
|
|
"options": {
|
|
"reduceOptions": { "calcs": ["lastNotNull"] },
|
|
"minVizWidth": 75
|
|
},
|
|
"fieldConfig": {
|
|
"defaults": {
|
|
"unit": "percent",
|
|
"min": 0,
|
|
"max": 100,
|
|
"thresholds": {
|
|
"mode": "absolute",
|
|
"steps": [
|
|
{ "color": "red", "value": null },
|
|
{ "color": "orange", "value": 20 },
|
|
{ "color": "yellow", "value": 50 },
|
|
{ "color": "green", "value": 80 }
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"targets": [
|
|
{
|
|
"expr": "network_ups_tools_battery_charge{ups=\"$ups\"}",
|
|
"legendFormat": "Charge",
|
|
"datasource": { "type": "prometheus", "uid": "$datasource" }
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"id": 3,
|
|
"type": "gauge",
|
|
"title": "Load",
|
|
"gridPos": { "x": 8, "y": 0, "w": 4, "h": 4 },
|
|
"options": { "reduceOptions": { "calcs": ["lastNotNull"] } },
|
|
"fieldConfig": {
|
|
"defaults": {
|
|
"unit": "percent",
|
|
"min": 0,
|
|
"max": 100,
|
|
"thresholds": {
|
|
"mode": "absolute",
|
|
"steps": [
|
|
{ "color": "green", "value": null },
|
|
{ "color": "yellow", "value": 60 },
|
|
{ "color": "red", "value": 85 }
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"targets": [
|
|
{
|
|
"expr": "network_ups_tools_ups_load{ups=\"$ups\"}",
|
|
"legendFormat": "Load",
|
|
"datasource": { "type": "prometheus", "uid": "$datasource" }
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"id": 4,
|
|
"type": "stat",
|
|
"title": "Runtime Remaining",
|
|
"gridPos": { "x": 12, "y": 0, "w": 4, "h": 4 },
|
|
"options": { "reduceOptions": { "calcs": ["lastNotNull"] } },
|
|
"fieldConfig": {
|
|
"defaults": {
|
|
"unit": "s",
|
|
"thresholds": {
|
|
"mode": "absolute",
|
|
"steps": [
|
|
{ "color": "red", "value": null },
|
|
{ "color": "orange", "value": 300 },
|
|
{ "color": "green", "value": 600 }
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"targets": [
|
|
{
|
|
"expr": "network_ups_tools_battery_runtime{ups=\"$ups\"}",
|
|
"legendFormat": "Runtime",
|
|
"datasource": { "type": "prometheus", "uid": "$datasource" }
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"id": 5,
|
|
"type": "stat",
|
|
"title": "Input Voltage",
|
|
"gridPos": { "x": 16, "y": 0, "w": 4, "h": 4 },
|
|
"options": { "reduceOptions": { "calcs": ["lastNotNull"] } },
|
|
"fieldConfig": {
|
|
"defaults": {
|
|
"unit": "volt",
|
|
"decimals": 1,
|
|
"thresholds": {
|
|
"mode": "absolute",
|
|
"steps": [
|
|
{ "color": "red", "value": null },
|
|
{ "color": "green", "value": 100 }
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"targets": [
|
|
{
|
|
"expr": "network_ups_tools_input_voltage{ups=\"$ups\"}",
|
|
"legendFormat": "Input V",
|
|
"datasource": { "type": "prometheus", "uid": "$datasource" }
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"id": 6,
|
|
"type": "stat",
|
|
"title": "Battery Voltage",
|
|
"gridPos": { "x": 20, "y": 0, "w": 4, "h": 4 },
|
|
"options": { "reduceOptions": { "calcs": ["lastNotNull"] } },
|
|
"fieldConfig": {
|
|
"defaults": {
|
|
"unit": "volt",
|
|
"decimals": 1,
|
|
"thresholds": {
|
|
"mode": "absolute",
|
|
"steps": [
|
|
{ "color": "red", "value": null },
|
|
{ "color": "green", "value": 10 }
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"targets": [
|
|
{
|
|
"expr": "network_ups_tools_battery_voltage{ups=\"$ups\"}",
|
|
"legendFormat": "Battery V",
|
|
"datasource": { "type": "prometheus", "uid": "$datasource" }
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"id": 7,
|
|
"type": "timeseries",
|
|
"title": "Battery Charge Over Time",
|
|
"gridPos": { "x": 0, "y": 4, "w": 12, "h": 8 },
|
|
"fieldConfig": {
|
|
"defaults": {
|
|
"unit": "percent",
|
|
"min": 0,
|
|
"max": 100,
|
|
"custom": { "lineWidth": 2, "fillOpacity": 10 },
|
|
"thresholds": {
|
|
"mode": "absolute",
|
|
"steps": [
|
|
{ "color": "red", "value": null },
|
|
{ "color": "green", "value": 50 }
|
|
]
|
|
},
|
|
"color": { "mode": "thresholds" }
|
|
}
|
|
},
|
|
"targets": [
|
|
{
|
|
"expr": "network_ups_tools_battery_charge{ups=\"$ups\"}",
|
|
"legendFormat": "Charge %",
|
|
"datasource": { "type": "prometheus", "uid": "$datasource" }
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"id": 8,
|
|
"type": "timeseries",
|
|
"title": "Load Over Time",
|
|
"gridPos": { "x": 12, "y": 4, "w": 12, "h": 8 },
|
|
"fieldConfig": {
|
|
"defaults": {
|
|
"unit": "percent",
|
|
"min": 0,
|
|
"custom": { "lineWidth": 2, "fillOpacity": 10 }
|
|
}
|
|
},
|
|
"targets": [
|
|
{
|
|
"expr": "network_ups_tools_ups_load{ups=\"$ups\"}",
|
|
"legendFormat": "Load %",
|
|
"datasource": { "type": "prometheus", "uid": "$datasource" }
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"id": 9,
|
|
"type": "timeseries",
|
|
"title": "Input Voltage Over Time",
|
|
"gridPos": { "x": 0, "y": 12, "w": 12, "h": 8 },
|
|
"fieldConfig": {
|
|
"defaults": {
|
|
"unit": "volt",
|
|
"decimals": 1,
|
|
"custom": { "lineWidth": 2, "fillOpacity": 5 }
|
|
}
|
|
},
|
|
"targets": [
|
|
{
|
|
"expr": "network_ups_tools_input_voltage{ups=\"$ups\"}",
|
|
"legendFormat": "Input Voltage",
|
|
"datasource": { "type": "prometheus", "uid": "$datasource" }
|
|
},
|
|
{
|
|
"expr": "network_ups_tools_output_voltage{ups=\"$ups\"}",
|
|
"legendFormat": "Output Voltage",
|
|
"datasource": { "type": "prometheus", "uid": "$datasource" }
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"id": 10,
|
|
"type": "timeseries",
|
|
"title": "Runtime Remaining Over Time",
|
|
"gridPos": { "x": 12, "y": 12, "w": 12, "h": 8 },
|
|
"fieldConfig": {
|
|
"defaults": {
|
|
"unit": "s",
|
|
"custom": { "lineWidth": 2, "fillOpacity": 10 }
|
|
}
|
|
},
|
|
"targets": [
|
|
{
|
|
"expr": "network_ups_tools_battery_runtime{ups=\"$ups\"}",
|
|
"legendFormat": "Runtime",
|
|
"datasource": { "type": "prometheus", "uid": "$datasource" }
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|