From 82ad11187e8b8cd423d8654b66c0a2904ea906f2 Mon Sep 17 00:00:00 2001 From: smile13 Date: Wed, 30 Sep 2020 21:54:57 +0300 Subject: [PATCH] add new metric Qtech.BFC --- sa/profiles/Qtech/BFC_PBIC_S/get_metrics.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/sa/profiles/Qtech/BFC_PBIC_S/get_metrics.py b/sa/profiles/Qtech/BFC_PBIC_S/get_metrics.py index 54c6a7bc4d..145e948541 100644 --- a/sa/profiles/Qtech/BFC_PBIC_S/get_metrics.py +++ b/sa/profiles/Qtech/BFC_PBIC_S/get_metrics.py @@ -95,6 +95,18 @@ class Script(GetMetricsScript): multi=True, ) + @metrics(["Environment | Pulse"], volatile=False, access="S") # SNMP version + def get_pulse(self, metrics): + for metric in metrics: + s_type = self.snmp.get("1.3.6.1.3.55.1.3.1.2.%s" % metric.ifindex) + if s_type == 2: + value = self.snmp.get("1.3.6.1.3.55.1.3.1.4.%s" % metric.ifindex) + self.set_metric( + id=("Environment | Pulse", metric.path), + path=["", "", "", metric.path[3]], + value=value, + ) + @metrics(["Environment | Power | Input | Status"], volatile=False, access="S") # SNMP version def get_power_input_status(self, metrics): for metric in metrics: -- GitLab