From 429e33f34f5ecde294c67d30522533b0d1a674c6 Mon Sep 17 00:00:00 2001
From: Jan David Mol <mol@astron.nl>
Date: Fri, 4 Aug 2023 12:10:51 +0200
Subject: [PATCH] L2SS-1471: Moved BSP points from SDP to SDPFirmware, fixed
 some other old errors

---
 dashboards/apsct.json   |  8 ++++----
 dashboards/beamlet.json |  6 +++---
 dashboards/clock.json   |  6 +++---
 dashboards/sdp.json     | 18 +++++++++---------
 dashboards/sensors.json |  2 +-
 5 files changed, 20 insertions(+), 20 deletions(-)

diff --git a/dashboards/apsct.json b/dashboards/apsct.json
index 0bfb0fa..465e45c 100644
--- a/dashboards/apsct.json
+++ b/dashboards/apsct.json
@@ -1457,7 +1457,7 @@
                 "uid": "prometheus"
               },
               "exemplar": false,
-              "expr": "device_attribute{host=\"$station\",device=~\"stat/recv/1\",name=\"RCU_ADC_locked_R\"}\r\n+ on(x, y) (10 * device_attribute{host=\"$station\",device=~\"stat/recv/1\", name=\"ANT_mask_RW\"})",
+              "expr": "device_attribute{host=\"$station\",device=~\"stat/recv[hl]/$subrack\",name=\"RCU_ADC_locked_R\"}\r\n+ on(x, y) (10 * device_attribute{host=\"$station\",device=~\"stat/recv[hl]/$subrack\", name=\"ANT_mask_RW\"})",
               "instant": true,
               "interval": "",
               "legendFormat": "{{x}} - input {{y}}",
@@ -1528,7 +1528,7 @@
                 "uid": "prometheus"
               },
               "exemplar": true,
-              "expr": "device_attribute{host=\"$station\",device=~\"stat/sdp/1\",name=\"FPGA_pps_present_R\"}\r\n+ on(x) (10 * device_attribute{host=\"$station\",device=~\"stat/sdp/1\",name=\"TR_fpga_mask_R\"})",
+              "expr": "device_attribute{host=\"$station\",device=~\"stat/sdpfirmware/.*\",name=\"FPGA_pps_present_R\"}\r\n+ on(device, x) (10 * device_attribute{host=\"$station\",device=~\"stat/sdpfirmware/.*\",name=\"TR_fpga_mask_R\"})",
               "interval": "",
               "legendFormat": "{{x}}",
               "refId": "A"
@@ -1610,7 +1610,7 @@
                 "uid": "prometheus"
               },
               "exemplar": true,
-              "expr": "device_attribute{host=\"$station\",device=~\"stat/sdp/1\",name=\"FPGA_pps_capture_cnt_R\"} / 1000000",
+              "expr": "device_attribute{host=\"$station\",device=~\"stat/sdpfirmware/.*\",name=\"FPGA_pps_capture_cnt_R\"} / 1000000",
               "interval": "",
               "legendFormat": "{{x}}",
               "refId": "A"
@@ -1679,7 +1679,7 @@
                 "uid": "prometheus"
               },
               "exemplar": true,
-              "expr": "(device_attribute{host=\"$station\",device=~\"stat/beamlet/1\", name=\"FPGA_beamlet_output_nof_packets_R\"} > bool -1)\r\n+ on(x) (10 * device_attribute{host=\"$station\",device=~\"stat/sdp/1\", name=\"TR_fpga_mask_R\"})\r\n",
+              "expr": "(device_attribute{host=\"$station\",device=~\"stat/beamlet/1\", name=\"FPGA_beamlet_output_nof_packets_R\"} > bool -1)\r\n+ on(x) (10 * device_attribute{host=\"$station\",device=~\"stat/sdpfirmware/1\", name=\"TR_fpga_mask_R\"})\r\n",
               "interval": "",
               "legendFormat": "{{x}}",
               "refId": "A"
diff --git a/dashboards/beamlet.json b/dashboards/beamlet.json
index da16f3b..066f46c 100644
--- a/dashboards/beamlet.json
+++ b/dashboards/beamlet.json
@@ -385,7 +385,7 @@
               "uid": "prometheus"
             },
             "exemplar": true,
-            "expr": "device_attribute{host=\"$station\",device=\"stat/sdp/1\",name=\"TR_fpga_mask_R\"}",
+            "expr": "device_attribute{host=\"$station\",device=\"stat/sdpfirmware/$antennafield\",name=\"TR_fpga_mask_R\"}",
             "interval": "",
             "legendFormat": "{{x}}",
             "refId": "A"
@@ -459,7 +459,7 @@
               "uid": "prometheus"
             },
             "exemplar": true,
-            "expr": "device_attribute{host=\"$station\",device=\"stat/beamlet/$antennafield\", name=\"FPGA_beamlet_output_enable_R\"}\r\n+ on(x) (10 * device_attribute{host=\"$station\",device=\"stat/sdp/1\", name=\"TR_fpga_mask_R\"})\r\n",
+            "expr": "device_attribute{host=\"$station\",device=\"stat/beamlet/$antennafield\", name=\"FPGA_beamlet_output_enable_R\"}\r\n+ on(x) (10 * device_attribute{host=\"$station\",device=\"stat/sdpfirmware/$antennafield\", name=\"TR_fpga_mask_R\"})\r\n",
             "interval": "",
             "legendFormat": "{{x}}",
             "refId": "A"
@@ -529,7 +529,7 @@
               "uid": "prometheus"
             },
             "exemplar": true,
-            "expr": "(device_attribute{host=\"$station\",device=\"stat/beamlet/$antennafield\", name=\"FPGA_beamlet_output_nof_packets_R\"} > bool -1)\r\n+ on(x) (10 * device_attribute{host=\"$station\",device=\"stat/sdp/1\", name=\"TR_fpga_mask_R\"})\r\n",
+            "expr": "(device_attribute{host=\"$station\",device=\"stat/beamlet/$antennafield\", name=\"FPGA_beamlet_output_nof_packets_R\"} > bool -1)\r\n+ on(x) (10 * device_attribute{host=\"$station\",device=\"stat/sdpfirmware/$antennafield\", name=\"TR_fpga_mask_R\"})\r\n",
             "interval": "",
             "legendFormat": "{{x}}",
             "refId": "A"
diff --git a/dashboards/clock.json b/dashboards/clock.json
index 512cb7f..211bac6 100644
--- a/dashboards/clock.json
+++ b/dashboards/clock.json
@@ -428,7 +428,7 @@
           },
           "editorMode": "code",
           "exemplar": true,
-          "expr": "device_attribute{host=\"$station\",device=\"stat/sdp/$antennafield\",name=\"FPGA_pps_present_R\"}\r\n+ on(x) (10 * device_attribute{host=\"$station\",device=\"stat/sdp/$antennafield\",name=\"TR_fpga_mask_R\"})",
+          "expr": "device_attribute{host=\"$station\",device=\"stat/sdpfirmware/$antennafield\",name=\"FPGA_pps_present_R\"}\r\n+ on(x) (10 * device_attribute{host=\"$station\",device=\"stat/sdpfirmware/$antennafield\",name=\"TR_fpga_mask_R\"})",
           "interval": "",
           "legendFormat": "FPGA {{x}}",
           "range": true,
@@ -517,7 +517,7 @@
           },
           "editorMode": "code",
           "exemplar": true,
-          "expr": "device_attribute{host=\"$station\",device=\"stat/sdp/$antennafield\",name=\"FPGA_pps_capture_cnt_R\"} / 1000000",
+          "expr": "device_attribute{host=\"$station\",device=\"stat/sdpfirmware/$antennafield\",name=\"FPGA_pps_capture_cnt_R\"} / 1000000",
           "interval": "",
           "legendFormat": "FPGA {{x}}",
           "range": true,
@@ -614,7 +614,7 @@
             "uid": "prometheus"
           },
           "exemplar": true,
-          "expr": "device_attribute{host=\"$station\",device=\"stat/sdp/$antennafield\",name=\"FPGA_time_since_last_pps_R\"}",
+          "expr": "device_attribute{host=\"$station\",device=\"stat/sdpfirmware/$antennafield\",name=\"FPGA_time_since_last_pps_R\"}",
           "interval": "",
           "legendFormat": "{{x}}",
           "refId": "A"
diff --git a/dashboards/sdp.json b/dashboards/sdp.json
index b2e347f..3a305d5 100644
--- a/dashboards/sdp.json
+++ b/dashboards/sdp.json
@@ -765,7 +765,7 @@
             "uid": "prometheus"
           },
           "exemplar": true,
-          "expr": "device_attribute{host=\"$station\",device=\"stat/sdp/$antennafield\",name=\"TR_fpga_mask_R\"}",
+          "expr": "device_attribute{host=\"$station\",device=\"stat/sdpfirmware/$antennafield\",name=\"TR_fpga_mask_R\"}",
           "interval": "",
           "legendFormat": "{{x}}",
           "refId": "A"
@@ -835,7 +835,7 @@
             "uid": "prometheus"
           },
           "exemplar": true,
-          "expr": "device_attribute{host=\"$station\",device=\"stat/sdp/$antennafield\",name=\"TR_fpga_communication_error_R\"}\r\n+ on(x) (device_attribute{host=\"$station\",device=\"stat/sdp/$antennafield\",name=\"FPGA_firmware_version_R\"} == bool 0)\r\n+ on(x) (10 * device_attribute{host=\"$station\",device=\"stat/sdp/$antennafield\",name=\"TR_fpga_mask_R\"})",
+          "expr": "device_attribute{host=\"$station\",device=\"stat/sdp/$antennafield\",name=\"TR_fpga_communication_error_R\"}\r\n+ on(x) (device_attribute{host=\"$station\",device=\"stat/sdpfirmware/$antennafield\",name=\"FPGA_firmware_version_R\"} == bool 0)\r\n+ on(x) (10 * device_attribute{host=\"$station\",device=\"stat/sdpfirmware/$antennafield\",name=\"TR_fpga_mask_R\"})",
           "interval": "",
           "legendFormat": "{{x}}",
           "refId": "A"
@@ -934,7 +934,7 @@
             "uid": "prometheus"
           },
           "exemplar": true,
-          "expr": "device_attribute{host=\"$station\",device=\"stat/sdp/$antennafield\",name=\"FPGA_time_since_last_pps_R\"}",
+          "expr": "device_attribute{host=\"$station\",device=\"stat/sdpfirmware/$antennafield\",name=\"FPGA_time_since_last_pps_R\"}",
           "interval": "",
           "legendFormat": "{{x}}",
           "refId": "A"
@@ -1004,7 +1004,7 @@
             "uid": "prometheus"
           },
           "exemplar": true,
-          "expr": "device_attribute{host=\"$station\",device=\"stat/sdp/$antennafield\",name=\"FPGA_pps_present_R\"}\r\n+ on(x) (10 * device_attribute{host=\"$station\",device=\"stat/sdp/$antennafield\",name=\"TR_fpga_mask_R\"})",
+          "expr": "device_attribute{host=\"$station\",device=\"stat/sdpfirmware/$antennafield\",name=\"FPGA_pps_present_R\"}\r\n+ on(x) (10 * device_attribute{host=\"$station\",device=\"stat/sdpfirmware/$antennafield\",name=\"TR_fpga_mask_R\"})",
           "interval": "",
           "legendFormat": "{{x}}",
           "refId": "A"
@@ -1145,7 +1145,7 @@
             "uid": "prometheus"
           },
           "exemplar": true,
-          "expr": "device_attribute{host=\"$station\",device=\"stat/sdp/$antennafield\",name=\"FPGA_temp_R\"}",
+          "expr": "device_attribute{host=\"$station\",device=\"stat/sdpfirmware/$antennafield\",name=\"FPGA_temp_R\"}",
           "interval": "",
           "legendFormat": "{{x}}",
           "refId": "A"
@@ -1215,7 +1215,7 @@
             "uid": "prometheus"
           },
           "exemplar": true,
-          "expr": "(sum by (x) (device_attribute{host=\"$station\",device=\"stat/sdp/$antennafield\", name=\"FPGA_signal_input_rms_R\"}) == bool 0)\r\n+ on(x) (10 * device_attribute{host=\"$station\",device=\"stat/sdp/$antennafield\", name=\"TR_fpga_mask_R\"})\r\n",
+          "expr": "(sum by (x) (device_attribute{host=\"$station\",device=\"stat/sdp/$antennafield\", name=\"FPGA_signal_input_rms_R\"}) == bool 0)\r\n+ on(x) (10 * device_attribute{host=\"$station\",device=\"stat/sdpfirmware/$antennafield\", name=\"TR_fpga_mask_R\"})\r\n",
           "instant": false,
           "interval": "",
           "legendFormat": "{{x}}",
@@ -1286,7 +1286,7 @@
             "uid": "prometheus"
           },
           "exemplar": true,
-          "expr": "(1 - device_attribute{host=\"$station\",device=\"stat/sdp/$antennafield\",   name=\"FPGA_processing_enable_R\"})\r\n+ on(x) (device_attribute{host=\"$station\",device=\"stat/sdp/$antennafield\", name=\"FPGA_boot_image_R\"} != bool 1)\r\n+ on(x) (10 * device_attribute{host=\"$station\",device=\"stat/sdp/$antennafield\", name=\"TR_fpga_mask_R\"})",
+          "expr": "(1 - device_attribute{host=\"$station\",device=\"stat/sdp/$antennafield\",   name=\"FPGA_processing_enable_R\"})\r\n+ on(x) (device_attribute{host=\"$station\",device=\"stat/sdp/$antennafield\", name=\"FPGA_boot_image_R\"} != bool 1)\r\n+ on(x) (10 * device_attribute{host=\"$station\",device=\"stat/sdpfirmware/$antennafield\", name=\"TR_fpga_mask_R\"})",
           "hide": false,
           "instant": false,
           "interval": "",
@@ -3620,7 +3620,7 @@
             "uid": "prometheus"
           },
           "exemplar": true,
-          "expr": "device_attribute{host=\"$station\",device=\"stat/sdp/$antennafield\",name=\"FPGA_temp_R\"} > 0",
+          "expr": "device_attribute{host=\"$station\",device=\"stat/sdpfirmware/$antennafield\",name=\"FPGA_temp_R\"} > 0",
           "interval": "",
           "legendFormat": "Uniboard {{y}} - FPGA {{x}}",
           "refId": "A"
@@ -4149,7 +4149,7 @@
                 "uid": "prometheus"
               },
               "exemplar": false,
-              "expr": "device_attribute{host=\"$station\",device=\"stat/sdp/$antennafield\",name=\"TR_fpga_mask_R\"}",
+              "expr": "device_attribute{host=\"$station\",device=\"stat/sdpfirmware/$antennafield\",name=\"TR_fpga_mask_R\"}",
               "format": "time_series",
               "instant": true,
               "interval": "",
diff --git a/dashboards/sensors.json b/dashboards/sensors.json
index 90f6a0e..9970a04 100644
--- a/dashboards/sensors.json
+++ b/dashboards/sensors.json
@@ -127,7 +127,7 @@
       "targets": [
         {
           "exemplar": true,
-          "expr": "device_attribute{host=\"$station\",device=\"stat/sdp/$antennafield\",name=\"FPGA_temp_R\"} != 0",
+          "expr": "device_attribute{host=\"$station\",device=\"stat/sdpfirmware/$antennafield\",name=\"FPGA_temp_R\"} != 0",
           "format": "time_series",
           "hide": false,
           "instant": false,
-- 
GitLab