From eda6af4d54e2ee059b6485be49e48bd5c49a5f8c Mon Sep 17 00:00:00 2001
From: Jan David Mol <mol@astron.nl>
Date: Tue, 28 Sep 2021 20:34:43 +0200
Subject: [PATCH] L2SS-394 L2SS-357: Add Uniboard PSU monitoring to main
 dashboard

---
 docker-compose/grafana/dashboards/home.json | 128 +++++++++++++++++++-
 1 file changed, 126 insertions(+), 2 deletions(-)

diff --git a/docker-compose/grafana/dashboards/home.json b/docker-compose/grafana/dashboards/home.json
index 65f7fa080..8d466dacb 100644
--- a/docker-compose/grafana/dashboards/home.json
+++ b/docker-compose/grafana/dashboards/home.json
@@ -732,7 +732,7 @@
       "fieldConfig": {
         "defaults": {
           "color": {
-            "mode": "continuous-BlYlRd",
+            "mode": "palette-classic",
             "seriesBy": "max"
           },
           "custom": {
@@ -846,6 +846,130 @@
       "title": "Uniboard2 Node Temperatures",
       "type": "timeseries"
     },
+    {
+      "datasource": "Prometheus",
+      "description": "Temperature sensors of the power supply on each board",
+      "fieldConfig": {
+        "defaults": {
+          "color": {
+            "mode": "palette-classic",
+            "seriesBy": "max"
+          },
+          "custom": {
+            "axisLabel": "",
+            "axisPlacement": "auto",
+            "barAlignment": 0,
+            "drawStyle": "line",
+            "fillOpacity": 0,
+            "gradientMode": "none",
+            "hideFrom": {
+              "legend": false,
+              "tooltip": false,
+              "viz": false
+            },
+            "lineInterpolation": "linear",
+            "lineWidth": 1,
+            "pointSize": 5,
+            "scaleDistribution": {
+              "type": "linear"
+            },
+            "showPoints": "never",
+            "spanNulls": false,
+            "stacking": {
+              "group": "A",
+              "mode": "none"
+            },
+            "thresholdsStyle": {
+              "mode": "line"
+            }
+          },
+          "mappings": [],
+          "thresholds": {
+            "mode": "absolute",
+            "steps": [
+              {
+                "color": "green",
+                "value": null
+              },
+              {
+                "color": "red",
+                "value": 85
+              }
+            ]
+          },
+          "unit": "celsius"
+        },
+        "overrides": []
+      },
+      "gridPos": {
+        "h": 8,
+        "w": 5,
+        "x": 5,
+        "y": 20
+      },
+      "id": 50,
+      "options": {
+        "legend": {
+          "calcs": [],
+          "displayMode": "hidden",
+          "placement": "bottom"
+        },
+        "tooltip": {
+          "mode": "single"
+        }
+      },
+      "targets": [
+        {
+          "exemplar": true,
+          "expr": "device_attribute{device=\"lts/unb2/1\",name=\"UNB2_POL_QSFP_N01_TEMP_R\"}",
+          "interval": "",
+          "legendFormat": "QSFP N01 board {{x}} ",
+          "refId": "A"
+        },
+        {
+          "exemplar": true,
+          "expr": "device_attribute{device=\"lts/unb2/1\",name=\"UNB2_POL_QSFP_N23_TEMP_R\"}",
+          "hide": false,
+          "interval": "",
+          "legendFormat": "QSFP N23 board {{x}}",
+          "refId": "B"
+        },
+        {
+          "exemplar": true,
+          "expr": "device_attribute{device=\"lts/unb2/1\",name=\"UNB2_POL_SWITCH_1V2_TEMP_R\"}",
+          "hide": false,
+          "interval": "",
+          "legendFormat": "Switch 1v2 board {{x}}",
+          "refId": "C"
+        },
+        {
+          "exemplar": true,
+          "expr": "device_attribute{device=\"lts/unb2/1\",name=\"UNB2_POL_SWITCH_PHY_TEMP_R\"}",
+          "hide": false,
+          "interval": "",
+          "legendFormat": "Switch PHY board {{x}}",
+          "refId": "D"
+        },
+        {
+          "exemplar": true,
+          "expr": "device_attribute{device=\"lts/unb2/1\",name=\"UNB2_POL_CLOCK_TEMP_R\"}",
+          "hide": false,
+          "interval": "",
+          "legendFormat": "Clock PWR board {{x}}",
+          "refId": "E"
+        },
+        {
+          "exemplar": true,
+          "expr": "device_attribute{device=\"lts/unb2/1\",name=\"UNB2_DC_DC_48V_12V_TEMP_R\"}",
+          "hide": false,
+          "interval": "",
+          "legendFormat": "DC-DC board {{x}}",
+          "refId": "F"
+        }
+      ],
+      "title": "Uniboard2 Power Supply Temperatures",
+      "type": "timeseries"
+    },
     {
       "datasource": "Prometheus",
       "description": "Voltage sensors of each node on each board",
@@ -905,7 +1029,7 @@
       "gridPos": {
         "h": 8,
         "w": 5,
-        "x": 5,
+        "x": 10,
         "y": 20
       },
       "id": 49,
-- 
GitLab