|
189 | 189 | graphTooltip = 0; |
190 | 190 | links = []; |
191 | 191 | panels = [ |
| 192 | + # Row 0: Power Status Timeline |
| 193 | + { |
| 194 | + type = "state-timeline"; |
| 195 | + title = "Power Outage History"; |
| 196 | + description = "Shows when the UPS was on battery power (power outage) vs online (AC power)"; |
| 197 | + gridPos = { h = 6; w = 24; x = 0; y = 0; }; |
| 198 | + datasource = { type = "prometheus"; uid = "Prometheus"; }; |
| 199 | + fieldConfig.defaults = { |
| 200 | + color.mode = "thresholds"; |
| 201 | + thresholds.mode = "absolute"; |
| 202 | + thresholds.steps = [ |
| 203 | + { color = "green"; value = null; } |
| 204 | + { color = "red"; value = 1; } |
| 205 | + ]; |
| 206 | + mappings = [ |
| 207 | + { type = "value"; options."0" = { text = "Online (AC)"; color = "green"; }; } |
| 208 | + { type = "value"; options."1" = { text = "On Battery"; color = "red"; }; } |
| 209 | + ]; |
| 210 | + custom.fillOpacity = 80; |
| 211 | + }; |
| 212 | + options = { |
| 213 | + showValue = "auto"; |
| 214 | + alignValue = "center"; |
| 215 | + mergeValues = true; |
| 216 | + rowHeight = 0.9; |
| 217 | + legend = { displayMode = "list"; placement = "bottom"; }; |
| 218 | + }; |
| 219 | + targets = [{ |
| 220 | + expr = ''network_ups_tools_ups_status{flag="OB"}''; |
| 221 | + legendFormat = "Power Status"; |
| 222 | + refId = "A"; |
| 223 | + }]; |
| 224 | + } |
192 | 225 | # Row 1: Status gauges |
193 | 226 | { |
194 | 227 | type = "gauge"; |
195 | 228 | title = "Battery Charge"; |
196 | | - gridPos = { h = 8; w = 6; x = 0; y = 0; }; |
| 229 | + gridPos = { h = 8; w = 6; x = 0; y = 6; }; |
197 | 230 | datasource = { type = "prometheus"; uid = "Prometheus"; }; |
198 | 231 | fieldConfig.defaults = { |
199 | 232 | color.mode = "thresholds"; |
|
214 | 247 | { |
215 | 248 | type = "gauge"; |
216 | 249 | title = "UPS Load"; |
217 | | - gridPos = { h = 8; w = 6; x = 6; y = 0; }; |
| 250 | + gridPos = { h = 8; w = 6; x = 6; y = 6; }; |
218 | 251 | datasource = { type = "prometheus"; uid = "Prometheus"; }; |
219 | 252 | fieldConfig.defaults = { |
220 | 253 | color.mode = "thresholds"; |
|
235 | 268 | { |
236 | 269 | type = "stat"; |
237 | 270 | title = "Runtime Remaining"; |
238 | | - gridPos = { h = 8; w = 6; x = 12; y = 0; }; |
| 271 | + gridPos = { h = 8; w = 6; x = 12; y = 6; }; |
239 | 272 | datasource = { type = "prometheus"; uid = "Prometheus"; }; |
240 | 273 | fieldConfig.defaults = { |
241 | 274 | color.mode = "thresholds"; |
|
254 | 287 | { |
255 | 288 | type = "stat"; |
256 | 289 | title = "Power Draw"; |
257 | | - gridPos = { h = 8; w = 6; x = 18; y = 0; }; |
| 290 | + gridPos = { h = 8; w = 6; x = 18; y = 6; }; |
258 | 291 | datasource = { type = "prometheus"; uid = "Prometheus"; }; |
259 | 292 | fieldConfig.defaults = { |
260 | 293 | color.mode = "palette-classic"; |
|
267 | 300 | { |
268 | 301 | type = "timeseries"; |
269 | 302 | title = "Input/Output Voltage"; |
270 | | - gridPos = { h = 8; w = 12; x = 0; y = 8; }; |
| 303 | + gridPos = { h = 8; w = 12; x = 0; y = 14; }; |
271 | 304 | datasource = { type = "prometheus"; uid = "Prometheus"; }; |
272 | 305 | fieldConfig.defaults = { unit = "volt"; }; |
273 | 306 | options = { legend = { displayMode = "list"; placement = "bottom"; }; }; |
|
279 | 312 | { |
280 | 313 | type = "timeseries"; |
281 | 314 | title = "Battery Voltage"; |
282 | | - gridPos = { h = 8; w = 12; x = 12; y = 8; }; |
| 315 | + gridPos = { h = 8; w = 12; x = 12; y = 14; }; |
283 | 316 | datasource = { type = "prometheus"; uid = "Prometheus"; }; |
284 | 317 | fieldConfig.defaults = { unit = "volt"; }; |
285 | 318 | options = { legend = { displayMode = "list"; placement = "bottom"; }; }; |
|
292 | 325 | { |
293 | 326 | type = "timeseries"; |
294 | 327 | title = "UPS Load Over Time"; |
295 | | - gridPos = { h = 8; w = 12; x = 0; y = 16; }; |
| 328 | + gridPos = { h = 8; w = 12; x = 0; y = 22; }; |
296 | 329 | datasource = { type = "prometheus"; uid = "Prometheus"; }; |
297 | 330 | fieldConfig.defaults = { unit = "percent"; min = 0; max = 100; }; |
298 | 331 | options = { legend = { displayMode = "list"; placement = "bottom"; }; }; |
|
301 | 334 | { |
302 | 335 | type = "timeseries"; |
303 | 336 | title = "Power Consumption"; |
304 | | - gridPos = { h = 8; w = 12; x = 12; y = 16; }; |
| 337 | + gridPos = { h = 8; w = 12; x = 12; y = 22; }; |
305 | 338 | datasource = { type = "prometheus"; uid = "Prometheus"; }; |
306 | 339 | fieldConfig.defaults = { unit = "watt"; }; |
307 | 340 | options = { legend = { displayMode = "list"; placement = "bottom"; }; }; |
|
314 | 347 | { |
315 | 348 | type = "timeseries"; |
316 | 349 | title = "Battery Charge Over Time"; |
317 | | - gridPos = { h = 8; w = 12; x = 0; y = 24; }; |
| 350 | + gridPos = { h = 8; w = 12; x = 0; y = 30; }; |
318 | 351 | datasource = { type = "prometheus"; uid = "Prometheus"; }; |
319 | 352 | fieldConfig.defaults = { unit = "percent"; min = 0; max = 100; }; |
320 | 353 | options = { legend = { displayMode = "list"; placement = "bottom"; }; }; |
|
323 | 356 | { |
324 | 357 | type = "timeseries"; |
325 | 358 | title = "UPS Efficiency"; |
326 | | - gridPos = { h = 8; w = 12; x = 12; y = 24; }; |
| 359 | + gridPos = { h = 8; w = 12; x = 12; y = 30; }; |
327 | 360 | datasource = { type = "prometheus"; uid = "Prometheus"; }; |
328 | 361 | fieldConfig.defaults = { unit = "percent"; min = 0; max = 100; }; |
329 | 362 | options = { legend = { displayMode = "list"; placement = "bottom"; }; }; |
|
333 | 366 | { |
334 | 367 | type = "timeseries"; |
335 | 368 | title = "Input/Output Frequency"; |
336 | | - gridPos = { h = 8; w = 24; x = 0; y = 32; }; |
| 369 | + gridPos = { h = 8; w = 24; x = 0; y = 38; }; |
337 | 370 | datasource = { type = "prometheus"; uid = "Prometheus"; }; |
338 | 371 | fieldConfig.defaults = { unit = "hertz"; }; |
339 | 372 | options = { legend = { displayMode = "list"; placement = "bottom"; }; }; |
|
0 commit comments