Module: check_mk
Branch: master
Commit: ff9ce1fa9befa262faab79bcb433166628eb74e3
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=ff9ce1fa9befa2…
Author: Konstantin Büttner <kb(a)mathias-kettner.de>
Date: Tue Dec 4 13:39:21 2018 +0100
6982 FIX apc_inrow_airflow: Fix scaling of airflow value
Change-Id: I32dcb897c4edc84451e64a48ea3f9a471ea98791
---
.werks/6982 | 11 +++++++++++
checks/apc_inrow_airflow | 15 +++++++++++----
2 files changed, 22 insertions(+), 4 deletions(-)
diff --git a/.werks/6982 b/.werks/6982
new file mode 100644
index 0000000..96f9196
--- /dev/null
+++ b/.werks/6982
@@ -0,0 +1,11 @@
+Title: apc_inrow_airflow: Fix scaling of airflow value
+Level: 1
+Component: checks
+Class: fix
+Compatible: compat
+Edition: cre
+State: unknown
+Version: 1.6.0i1
+Date: 1543913545
+
+
diff --git a/checks/apc_inrow_airflow b/checks/apc_inrow_airflow
index b94bd80..de7fb76 100644
--- a/checks/apc_inrow_airflow
+++ b/checks/apc_inrow_airflow
@@ -25,8 +25,8 @@
# Boston, MA 02110-1301 USA.
apc_inrow_airflow_default_levels = {
- "level_low": (5.0, 2.0),
- "level_high": (10.0, 11.0),
+ "level_low": (500.0, 200.0),
+ "level_high": (1000.0, 1100.0),
}
@@ -36,7 +36,14 @@ def inventory_apc_inrow_airflow(info):
def check_apc_inrow_airflow(_no_item, params, info):
- flow = saveint(info[0][0]) / 100.0
+ # The MIB states that this value is given in hundredths of liters per second.
+ # However, it appears that the device actually returns l/s, as the oom should
+ # be closer to 1000 l/s. (cf.
https://www.apc.com/salestools/DRON-AAAR53/DRON-AAAR53_R1_EN.pdf)
+ try:
+ flow = float(info[0][0])
+ except:
+ return
+
state = 0
message = ""
@@ -57,7 +64,7 @@ def check_apc_inrow_airflow(_no_item, params, info):
message = "too high"
perf = [("flow", flow, warn, crit)]
- return state, "Current: %.2fl/s %s" % (flow, message), perf
+ return state, "Current: %.0f l/s %s" % (flow, message), perf
check_info["apc_inrow_airflow"] = {