From 74f405125e76322bf3a2485b01018854237bfb58 Mon Sep 17 00:00:00 2001
From: Alexis Bitaillou <alexis.bitaillou@inria.fr>
Date: Thu, 27 Mar 2025 11:41:11 +0100
Subject: [PATCH] [Nantes] add cooling system metrics

---
 .../sites/nantes/pdus/cooling-Z1.json         | 51 ++++++++++++++++
 .../grid5000/sites/nantes/pdus/pdu-Z1.10.json |  2 +-
 .../grid5000/sites/nantes/pdus/pdu-Z1.11.json |  4 +-
 .../grid5000/sites/nantes/pdus/pdu-Z1.20.json |  2 +-
 .../grid5000/sites/nantes/pdus/pdu-Z1.21.json |  4 +-
 .../grid5000/sites/nantes/pdus/pdu-Z1.40.json |  2 +-
 .../grid5000/sites/nantes/pdus/pdu-Z1.41.json |  4 +-
 .../grid5000/sites/nantes/pdus/pdu-Z1.50.json |  2 +-
 .../grid5000/sites/nantes/pdus/pdu-Z1.51.json |  4 +-
 input/grid5000/sites/nantes/pdus.yaml         | 59 +++++++++++++++----
 10 files changed, 110 insertions(+), 24 deletions(-)
 create mode 100644 data/grid5000/sites/nantes/pdus/cooling-Z1.json

diff --git a/data/grid5000/sites/nantes/pdus/cooling-Z1.json b/data/grid5000/sites/nantes/pdus/cooling-Z1.json
new file mode 100644
index 00000000000..182882d592a
--- /dev/null
+++ b/data/grid5000/sites/nantes/pdus/cooling-Z1.json
@@ -0,0 +1,51 @@
+{
+  "ip": "192.168.1.17",
+  "mac": "00:c0:b7:f5:fa:63",
+  "metrics": [
+    {
+      "description": "Temperature in input of cooling system, in tenths of degrees Celsius",
+      "name": "cooling_input_temperature_tenth_celsius",
+      "period": 5000,
+      "source": {
+        "id": "1.3.6.1.4.1.318.1.1.27.1.4.1.2.1.3.1.7",
+        "protocol": "snmp"
+      }
+    },
+    {
+      "description": "Temperature in output of cooling system, in tenths of degrees Celsius",
+      "name": "cooling_output_temperature_tenth_celsius",
+      "period": 5000,
+      "source": {
+        "id": "1.3.6.1.4.1.318.1.1.27.1.4.1.2.1.3.1.9",
+        "protocol": "snmp"
+      }
+    },
+    {
+      "description": "Power consumption of cooling system, in tenths of kilowatt",
+      "name": "cooling_power_watt",
+      "period": 5000,
+      "source": {
+        "id": "1.3.6.1.4.1.318.1.1.27.1.6.1.2.1.3.1.2",
+        "protocol": "snmp"
+      }
+    },
+    {
+      "description": "Sensor temperature reading, in tenths of degrees Celsius",
+      "name": "pdu_temperature_tenth_celsius",
+      "period": 5000,
+      "source": {
+        "id": "1.3.6.1.4.1.318.1.1.27.1.4.1.2.1.3.1.%PORT%",
+        "protocol": "snmp"
+      }
+    }
+  ],
+  "model": "ACRD602",
+  "ports": {
+    "31": "pdu-Z1.20",
+    "33": "pdu-Z1.40",
+    "35": "pdu-Z1.50"
+  },
+  "type": "pdu",
+  "uid": "cooling-Z1",
+  "vendor": "APC"
+}
\ No newline at end of file
diff --git a/data/grid5000/sites/nantes/pdus/pdu-Z1.10.json b/data/grid5000/sites/nantes/pdus/pdu-Z1.10.json
index c7c8bf99687..6b477e278b8 100644
--- a/data/grid5000/sites/nantes/pdus/pdu-Z1.10.json
+++ b/data/grid5000/sites/nantes/pdus/pdu-Z1.10.json
@@ -12,7 +12,7 @@
       }
     }
   ],
-  "model": "AP7940",
+  "model": "AP8453",
   "ports": {
     "10": "ecotype-44",
     "11": "ecotype-45",
diff --git a/data/grid5000/sites/nantes/pdus/pdu-Z1.11.json b/data/grid5000/sites/nantes/pdus/pdu-Z1.11.json
index 8fb267ac089..a9f7bc49355 100644
--- a/data/grid5000/sites/nantes/pdus/pdu-Z1.11.json
+++ b/data/grid5000/sites/nantes/pdus/pdu-Z1.11.json
@@ -12,7 +12,7 @@
       }
     },
     {
-      "description": "Sensor temperature reading in tenths of degrees Celsius",
+      "description": "Sensor temperature reading, in tenths of degrees Celsius",
       "name": "pdu_temperature_tenth_celsius",
       "period": 5000,
       "source": {
@@ -21,7 +21,7 @@
       }
     }
   ],
-  "model": "AP7940",
+  "model": "AP8453",
   "ports": {
     "1": "electrical_mgmt_board",
     "10": "ecotype-44",
diff --git a/data/grid5000/sites/nantes/pdus/pdu-Z1.20.json b/data/grid5000/sites/nantes/pdus/pdu-Z1.20.json
index 74a344bd291..202b8fcd0ae 100644
--- a/data/grid5000/sites/nantes/pdus/pdu-Z1.20.json
+++ b/data/grid5000/sites/nantes/pdus/pdu-Z1.20.json
@@ -12,7 +12,7 @@
       }
     }
   ],
-  "model": "AP7940",
+  "model": "AP8453",
   "ports": {
     "10": "ecotype-32",
     "11": "ecotype-33",
diff --git a/data/grid5000/sites/nantes/pdus/pdu-Z1.21.json b/data/grid5000/sites/nantes/pdus/pdu-Z1.21.json
index db8d89410e0..a5a367549ce 100644
--- a/data/grid5000/sites/nantes/pdus/pdu-Z1.21.json
+++ b/data/grid5000/sites/nantes/pdus/pdu-Z1.21.json
@@ -12,7 +12,7 @@
       }
     },
     {
-      "description": "Sensor temperature reading in tenths of degrees Celsius",
+      "description": "Sensor temperature reading, in tenths of degrees Celsius",
       "name": "pdu_temperature_tenth_celsius",
       "period": 5000,
       "source": {
@@ -21,7 +21,7 @@
       }
     }
   ],
-  "model": "AP7940",
+  "model": "AP8453",
   "ports": {
     "1": "ecotype-prod2",
     "10": "ecotype-32",
diff --git a/data/grid5000/sites/nantes/pdus/pdu-Z1.40.json b/data/grid5000/sites/nantes/pdus/pdu-Z1.40.json
index 5d2b5128c84..f59a05f0b74 100644
--- a/data/grid5000/sites/nantes/pdus/pdu-Z1.40.json
+++ b/data/grid5000/sites/nantes/pdus/pdu-Z1.40.json
@@ -12,7 +12,7 @@
       }
     }
   ],
-  "model": "AP7940",
+  "model": "AP8453",
   "ports": {
     "1": "sw-ecotype-adm",
     "10": "ecotype-20",
diff --git a/data/grid5000/sites/nantes/pdus/pdu-Z1.41.json b/data/grid5000/sites/nantes/pdus/pdu-Z1.41.json
index 790b361efbd..22e5d9056cc 100644
--- a/data/grid5000/sites/nantes/pdus/pdu-Z1.41.json
+++ b/data/grid5000/sites/nantes/pdus/pdu-Z1.41.json
@@ -12,7 +12,7 @@
       }
     },
     {
-      "description": "Sensor temperature reading in tenths of degrees Celsius",
+      "description": "Sensor temperature reading, in tenths of degrees Celsius",
       "name": "pdu_temperature_tenth_celsius",
       "period": 5000,
       "source": {
@@ -21,7 +21,7 @@
       }
     }
   ],
-  "model": "AP7940",
+  "model": "AP8453",
   "ports": {
     "10": "ecotype-20",
     "11": "ecotype-21",
diff --git a/data/grid5000/sites/nantes/pdus/pdu-Z1.50.json b/data/grid5000/sites/nantes/pdus/pdu-Z1.50.json
index 6f3f0072c58..eea4d36b8b0 100644
--- a/data/grid5000/sites/nantes/pdus/pdu-Z1.50.json
+++ b/data/grid5000/sites/nantes/pdus/pdu-Z1.50.json
@@ -12,7 +12,7 @@
       }
     }
   ],
-  "model": "AP7940",
+  "model": "AP8453",
   "ports": {
     "10": "ecotype-8",
     "11": "ecotype-9",
diff --git a/data/grid5000/sites/nantes/pdus/pdu-Z1.51.json b/data/grid5000/sites/nantes/pdus/pdu-Z1.51.json
index ed3c16c2cc2..33c0699aa61 100644
--- a/data/grid5000/sites/nantes/pdus/pdu-Z1.51.json
+++ b/data/grid5000/sites/nantes/pdus/pdu-Z1.51.json
@@ -12,7 +12,7 @@
       }
     },
     {
-      "description": "Sensor temperature reading in tenths of degrees Celsius",
+      "description": "Sensor temperature reading, in tenths of degrees Celsius",
       "name": "pdu_temperature_tenth_celsius",
       "period": 5000,
       "source": {
@@ -21,7 +21,7 @@
       }
     }
   ],
-  "model": "AP7940",
+  "model": "AP8453",
   "ports": {
     "1": "ecotype-prod2",
     "10": "ecotype-8",
diff --git a/input/grid5000/sites/nantes/pdus.yaml b/input/grid5000/sites/nantes/pdus.yaml
index bced731b582..4e653d3da02 100644
--- a/input/grid5000/sites/nantes/pdus.yaml
+++ b/input/grid5000/sites/nantes/pdus.yaml
@@ -2,7 +2,7 @@
 pdus:
   pdu-Z1.10:
     vendor: APC
-    model: 'AP7940'
+    model: 'AP8453'
     metrics:
       - name: pdu_outlet_power_watt
         description: Power consumption per outlet reported by PDU, in watt
@@ -28,7 +28,7 @@ pdus:
 
   pdu-Z1.11:
     vendor: APC
-    model: 'AP7940'
+    model: 'AP8453'
     metrics:
       - name: pdu_outlet_power_watt
         description: Power consumption per outlet reported by PDU, in watt
@@ -37,7 +37,7 @@ pdus:
           protocol: snmp
           id: 1.3.6.1.4.1.318.1.1.26.9.4.3.1.7.%PORT%
       - name: pdu_temperature_tenth_celsius
-        description: Sensor temperature reading in tenths of degrees Celsius
+        description: Sensor temperature reading, in tenths of degrees Celsius
         period: 5000
         source:
           protocol: snmp
@@ -61,7 +61,7 @@ pdus:
 
   pdu-Z1.20:
     vendor: APC
-    model: 'AP7940'
+    model: 'AP8453'
     metrics:
       - name: pdu_outlet_power_watt
         description: Power consumption per outlet reported by PDU, in watt
@@ -87,7 +87,7 @@ pdus:
 
   pdu-Z1.21:
     vendor: APC
-    model: 'AP7940'
+    model: 'AP8453'
     metrics:
       - name: pdu_outlet_power_watt
         description: Power consumption per outlet reported by PDU, in watt
@@ -96,7 +96,7 @@ pdus:
           protocol: snmp
           id: 1.3.6.1.4.1.318.1.1.26.9.4.3.1.7.%PORT%
       - name: pdu_temperature_tenth_celsius
-        description: Sensor temperature reading in tenths of degrees Celsius
+        description: Sensor temperature reading, in tenths of degrees Celsius
         period: 5000
         source:
           protocol: snmp
@@ -119,7 +119,7 @@ pdus:
       14: ecotype-36
   pdu-Z1.40:
     vendor: APC
-    model: 'AP7940'
+    model: 'AP8453'
     metrics:
       - name: pdu_outlet_power_watt
         description: Power consumption per outlet reported by PDU, in watt
@@ -146,7 +146,7 @@ pdus:
 
   pdu-Z1.41:
     vendor: APC
-    model: 'AP7940'
+    model: 'AP8453'
     metrics:
       - name: pdu_outlet_power_watt
         description: Power consumption per outlet reported by PDU, in watt
@@ -155,7 +155,7 @@ pdus:
           protocol: snmp
           id: 1.3.6.1.4.1.318.1.1.26.9.4.3.1.7.%PORT%
       - name: pdu_temperature_tenth_celsius
-        description: Sensor temperature reading in tenths of degrees Celsius
+        description: Sensor temperature reading, in tenths of degrees Celsius
         period: 5000
         source:
           protocol: snmp
@@ -178,7 +178,7 @@ pdus:
 
   pdu-Z1.50:
     vendor: APC
-    model: 'AP7940'
+    model: 'AP8453'
     metrics:
       - name: pdu_outlet_power_watt
         description: Power consumption per outlet reported by PDU, in watt
@@ -204,7 +204,7 @@ pdus:
 
   pdu-Z1.51:
     vendor: APC
-    model: 'AP7940'
+    model: 'AP8453'
     metrics:
       - name: pdu_outlet_power_watt
         description: Power consumption per outlet reported by PDU, in watt
@@ -213,7 +213,7 @@ pdus:
           protocol: snmp
           id: 1.3.6.1.4.1.318.1.1.26.9.4.3.1.7.%PORT%
       - name: pdu_temperature_tenth_celsius
-        description: Sensor temperature reading in tenths of degrees Celsius
+        description: Sensor temperature reading, in tenths of degrees Celsius
         period: 5000
         source:
           protocol: snmp
@@ -234,3 +234,38 @@ pdus:
       12: ecotype-10
       13: ecotype-11
       14: ecotype-12
+
+  cooling-Z1:
+    vendor: APC
+    model: 'ACRD602'
+    metrics:
+      - name: cooling_input_temperature_tenth_celsius
+        description: Temperature in input of cooling system, in tenths of degrees Celsius
+        period: 5000
+        source:
+          protocol: snmp
+          id: 1.3.6.1.4.1.318.1.1.27.1.4.1.2.1.3.1.7
+      - name: cooling_output_temperature_tenth_celsius
+        description: Temperature in output of cooling system, in tenths of degrees Celsius
+        period: 5000
+        source:
+          protocol: snmp
+          id: 1.3.6.1.4.1.318.1.1.27.1.4.1.2.1.3.1.9
+      - name: cooling_power_watt
+        description: Power consumption of cooling system, in tenths of kilowatt
+        period: 5000
+        source:
+          protocol: snmp
+          id: 1.3.6.1.4.1.318.1.1.27.1.6.1.2.1.3.1.2
+      - name: pdu_temperature_tenth_celsius
+        description: Sensor temperature reading, in tenths of degrees Celsius
+        period: 5000
+        source:
+          protocol: snmp
+          id: 1.3.6.1.4.1.318.1.1.27.1.4.1.2.1.3.1.%PORT%
+    ip: 192.168.1.17
+    mac: 00:c0:b7:f5:fa:63
+    ports:
+      31: pdu-Z1.20
+      33: pdu-Z1.40
+      35: pdu-Z1.50
-- 
GitLab