Module: check_mk
Branch: master
Commit: 1452e74fbf397812b8b884f6dbf97d3208f57bc3
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=1452e74fbf3978…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Fri Mar 28 10:23:59 2014 +0100
FIX hpux_if: Fixed exception during parsing of provided data on some systems
Some systems provide float values instead of ints. Parsing failed in this case
with a ValueError exception.
---
.werks/763 | 10 ++++++++++
ChangeLog | 1 +
checks/hpux_if | 2 +-
3 files changed, 12 insertions(+), 1 deletion(-)
diff --git a/.werks/763 b/.werks/763
new file mode 100644
index 0000000..8542aaf
--- /dev/null
+++ b/.werks/763
@@ -0,0 +1,10 @@
+Title: hpux_if: Fixed exception during parsing of provided data on some systems
+Level: 1
+Component: checks
+Class: fix
+State: unknown
+Version: 1.2.5i1
+Date: 1395998553
+
+Some systems provide float values instead of ints. Parsing failed in this case
+with a ValueError exception.
diff --git a/ChangeLog b/ChangeLog
index e900da7..503949c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -237,6 +237,7 @@
* 0758 FIX: check_sql: Fixed monitoring of stored procedures with oracle
* 0599 FIX: esx_vsphere_datastores: provisioning levels in WATO are no longer limited
to 101%
* 0737 FIX: megaraid_ldisks: now able to handle "No Virtual Drive
Configured" states...
+ * 0763 FIX: hpux_if: Fixed exception during parsing of provided data on some
systems...
Multisite:
* 0371 Added log class filter to hostsvcevents view
diff --git a/checks/hpux_if b/checks/hpux_if
index 9dba74a..4cad7d3 100644
--- a/checks/hpux_if
+++ b/checks/hpux_if
@@ -116,7 +116,7 @@ def hpux_parse_speed(speed):
mult = 1000 * 1000 * 1000
else:
mult = 1000 * 1000
- return int(parts[0]) * mult
+ return float(parts[0]) * mult
def hpux_parse_operstatus(txt):
if txt.lower() == "up":