allow for negative values of power in dBm
Message-ID: <54c0ece5.LgvPok4Lh7wXcLgP%gg(a)mathias-kettner.de>
User-Agent: Heirloom mailx 12.5 6/20/10
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Module: check_mk
Branch: master
Commit: 1434871de12c39bdf02037683ac5f3c128250c69
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=1434871de12c39…
Author: Goetz Golla <gg(a)mathias-kettner.de>
Date: Thu Jan 22 13:27:36 2015 +0100
#1858 FIX docsis_channels_downstream: allow for negative values of power in dBm
---
.werks/1858 | 9 +++++++++
ChangeLog | 1 +
checks/docsis_channels_downstream | 2 +-
3 files changed, 11 insertions(+), 1 deletion(-)
diff --git a/.werks/1858 b/.werks/1858
new file mode 100644
index 0000000..1eefa41
--- /dev/null
+++ b/.werks/1858
@@ -0,0 +1,9 @@
+Title: docsis_channels_downstream: allow for negative values of power in dBm
+Level: 1
+Component: checks
+Compatible: compat
+Version: 1.2.7i1
+Date: 1421929594
+Class: fix
+
+
diff --git a/ChangeLog b/ChangeLog
index 7281e67..1cff9a7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -103,6 +103,7 @@
NOTE: Please refer to the migration notes!
* 1671 FIX: windows agent: fixed gaps in eventlog monitoring after agent restart...
* 1856 FIX: ibm_svc_array ibm_svc_mdisk ibm_svc_mdiskgrp ibm_svc_portfc: made checks
more robust for varying number of parameters of IBM SVC agent plugin...
+ * 1858 FIX: docsis_channels_downstream: allow for negative values of power in dBm
Multisite:
* 1758 Improved exception hander: Shows details without additional debug request,
added mailto link for error report...
diff --git a/checks/docsis_channels_downstream b/checks/docsis_channels_downstream
index 10d0d6a..f4109b5 100644
--- a/checks/docsis_channels_downstream
+++ b/checks/docsis_channels_downstream
@@ -38,7 +38,7 @@ def check_docsis_channels_downstream(item, params, info):
if channel_id == item:
# Power
warn, crit = params["power"]
- power_dbmv = abs(float(int(power))) / 10
+ power_dbmv = float(int(power)) / 10
infotext = "Power is %.1f dBmV" % power_dbmv
levels = " (Levels Warn/Crit at %d dBmV/ %d dBmV)" % ( warn, crit
)
state = 0