Module: check_mk
Branch: master
Commit: 446234036cc5ccd7158a0abf1dee7ca8a43b3f3c
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=446234036cc5cc…
Author: Bastian Kuhn <bk(a)mathias-kettner.de>
Date: Fri Jul 27 09:31:30 2012 +0200
Added perfdata for f5_bigip_temp check
---
checks/f5_bigip_temp | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/checks/f5_bigip_temp b/checks/f5_bigip_temp
index 866d9ea..42748d4 100644
--- a/checks/f5_bigip_temp
+++ b/checks/f5_bigip_temp
@@ -69,12 +69,13 @@ def check_f5_bigip_temp(item, params, info):
if item == sensor[0]:
tmpdiff = sensor[1] - sensor[2]
msgtxt = " - Temperature is %dC" % (sensor[1])
+ perf = [ ('temp', sensor[1])]
if 5 >= tmpdiff:
- return (0, "OK" + msgtxt)
+ return (0, "OK" + msgtxt, perf)
elif tmpdiff > 15:
- return (2, "CRIT" + msgtxt + "(!!)")
+ return (2, "CRIT" + msgtxt + "(!!)", perf)
elif tmpdiff > 10:
- return (1, "WARN" + msgtxt + "(!)")
+ return (1, "WARN" + msgtxt + "(!)", perf)
else:
return (3, "UNKNOWN - unable to read temperature")
@@ -88,7 +89,7 @@ snmp_info["f5_bigip_temp"] = \
(".1.3.6.1.4.1.3375.2.1.3.1.2.1", [ 1, 2 ]), ]
-check_info["f5_bigip_temp"] = (check_f5_bigip_temp, "Temperature %s",
0, inventory_f5_bigip_temp )
+check_info["f5_bigip_temp"] = (check_f5_bigip_temp, "Temperature %s",
1, inventory_f5_bigip_temp )
# Get ID and Speed from the CPU and chassis fan tables