From 28bd642aee97502dc3f280326e5edfa513bdfa82 Mon Sep 17 00:00:00 2001
From: Lucas Nussbaum <lucas.nussbaum@inria.fr>
Date: Mon, 3 Feb 2025 21:37:38 +0100
Subject: [PATCH] [mercantour2] add metrics

---
 .../clusters/mercantour2/mercantour2.json     | 46 ++++++++++++++++++-
 .../mercantour2/mercantour2_metrics.yaml      | 41 +++++++++++++++++
 2 files changed, 86 insertions(+), 1 deletion(-)
 create mode 100644 input/grid5000/sites/sophia/clusters/mercantour2/mercantour2_metrics.yaml

diff --git a/data/grid5000/sites/sophia/clusters/mercantour2/mercantour2.json b/data/grid5000/sites/sophia/clusters/mercantour2/mercantour2.json
index 9135e78c892..55e2cef6e7d 100644
--- a/data/grid5000/sites/sophia/clusters/mercantour2/mercantour2.json
+++ b/data/grid5000/sites/sophia/clusters/mercantour2/mercantour2.json
@@ -5,7 +5,51 @@
   "kavlan": false,
   "manufactured_at": "2015-09-01",
   "metrics": [
-
+    {
+      "description": "Default subset of metrics from Prometheus Node Exporter",
+      "name": "prom_default_metrics",
+      "optional_period": 15000,
+      "period": 0,
+      "source": {
+        "id": [
+          "node_boot_time_seconds",
+          "node_cpu_scaling_frequency_hertz",
+          "node_cpu_seconds_total",
+          "node_filesystem_free_bytes",
+          "node_filesystem_size_bytes",
+          "node_load1",
+          "node_load15",
+          "node_load5",
+          "node_memory_Buffers_bytes",
+          "node_memory_Cached_bytes",
+          "node_memory_MemAvailable_bytes",
+          "node_memory_MemFree_bytes",
+          "node_memory_MemTotal_bytes",
+          "node_memory_Shmem_bytes",
+          "node_memory_SwapFree_bytes",
+          "node_memory_SwapTotal_bytes",
+          "node_network_receive_bytes_total",
+          "node_network_receive_packets_total",
+          "node_network_transmit_bytes_total",
+          "node_network_transmit_packets_total",
+          "node_procs_blocked",
+          "node_procs_running",
+          "kwollect_custom"
+        ],
+        "port": 9100,
+        "protocol": "prometheus"
+      }
+    },
+    {
+      "description": "All metrics from Prometheus Node Exporter",
+      "name": "prom_all_metrics",
+      "optional_period": 15000,
+      "period": 0,
+      "source": {
+        "port": 9100,
+        "protocol": "prometheus"
+      }
+    }
   ],
   "model": "Dell PowerEdge C6220 II",
   "priority": 201509,
diff --git a/input/grid5000/sites/sophia/clusters/mercantour2/mercantour2_metrics.yaml b/input/grid5000/sites/sophia/clusters/mercantour2/mercantour2_metrics.yaml
new file mode 100644
index 00000000000..1b7527d9fcc
--- /dev/null
+++ b/input/grid5000/sites/sophia/clusters/mercantour2/mercantour2_metrics.yaml
@@ -0,0 +1,41 @@
+---
+metrics:
+  - name: prom_default_metrics
+    description: Default subset of metrics from Prometheus Node Exporter
+    period: 0
+    optional_period: 15000
+    source:
+      protocol: prometheus
+      port: 9100
+      id:
+        - node_boot_time_seconds
+        - node_cpu_scaling_frequency_hertz
+        - node_cpu_seconds_total
+        - node_filesystem_free_bytes
+        - node_filesystem_size_bytes
+        - node_load1
+        - node_load15
+        - node_load5
+        - node_memory_Buffers_bytes
+        - node_memory_Cached_bytes
+        - node_memory_MemAvailable_bytes
+        - node_memory_MemFree_bytes
+        - node_memory_MemTotal_bytes
+        - node_memory_Shmem_bytes
+        - node_memory_SwapFree_bytes
+        - node_memory_SwapTotal_bytes
+        - node_network_receive_bytes_total
+        - node_network_receive_packets_total
+        - node_network_transmit_bytes_total
+        - node_network_transmit_packets_total
+        - node_procs_blocked
+        - node_procs_running
+        - kwollect_custom
+
+  - name: prom_all_metrics
+    description: All metrics from Prometheus Node Exporter
+    period: 0
+    optional_period: 15000
+    source:
+      protocol: prometheus
+      port: 9100
-- 
GitLab