Module: check_mk
Branch: master
Commit: 930872a8d2b41d8f9ac14f44b24640bac8e02017
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=930872a8d2b41d…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Tue Mar 22 15:20:52 2011 +0100
FIX: bluecoat_sensors: Using scale parameter provided by the host for reported values
---
ChangeLog | 1 +
checks/bluecoat_sensors | 10 +++++-----
2 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index ac432de..2ef138b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -49,6 +49,7 @@
clients. The check monitors the number of pending updates and checks if
a reboot is needed after updates have been installed.
* FIX: Linux mk_oracle: Updated tablespace query to use 'used blocks' instead
of 'user blocks'
+ * FIX: bluecoat_sensors: Using scale parameter provided by the host for reported
values
1.1.10:
diff --git a/checks/bluecoat_sensors b/checks/bluecoat_sensors
index 584b9df..5623e8a 100644
--- a/checks/bluecoat_sensors
+++ b/checks/bluecoat_sensors
@@ -31,14 +31,14 @@ def inventory_bluecoat_sensors(checkname, info):
def check_bluecoat_sensors(item, params, info):
for line in info:
if line[0] == item:
- perfdata = [("value", line[1]) ]
+ value = int(line[1]) * 10 ** int(line[3])
+ perfdata = [("value", value) ]
if line[2] == '1':
- return (0, "OK - %s" % (line[1],), perfdata)
+ return (0, "OK - %s" % (value,), perfdata)
else:
- return (2, "CRIT - %s" % (line[1], ), perfdata)
+ return (2, "CRIT - %s" % (value, ), perfdata)
return (3, "UNKNOWN - item not found in SNMP data")
-
check_info['bluecoat_sensors'] = (
check_bluecoat_sensors,
"%s",
@@ -47,4 +47,4 @@ check_info['bluecoat_sensors'] = (
snmp_info['bluecoat_sensors'] = (
".1.3.6.1.4.1.3417.2.1.1.1.1.1",
- [ 9, 5, 7 ]) # BLUECOAT fan, voltage, temperatures
+ [ 9, 5, 7, 4 ]) # BLUECOAT fan, voltage, temperatures, scale