Module: check_mk
Branch: master
Commit: 625934b59a8ed8858e04f4a9313f2ffe1539a0be
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=625934b59a8ed8…
Author: Bastian Kuhn <bk(a)mathias-kettner.de>
Date: Tue Sep 25 14:52:03 2012 +0200
Fixed fsc_temp check in case of sensor problems
---
checks/fsc_temp | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/checks/fsc_temp b/checks/fsc_temp
index b29bb00..0fc36d8 100644
--- a/checks/fsc_temp
+++ b/checks/fsc_temp
@@ -37,7 +37,9 @@ def check_fsc_temp(item, _no_params, info):
crit = int(line[3])
infotext = "%d C (levels at %d C / %d C)" % (current, warn, crit)
perfdata = [ ("temp", current, warn, crit, 0 ) ]
- if current >= crit and crit > 0:
+ if current == -1:
+ return(3, "UNKNOWN - Problem with sensor")
+ elif current >= crit and crit > 0:
return (2, "CRIT - %s" % infotext, perfdata)
elif current >= warn and warn > 0:
return (1, "WARN - %s" % infotext, perfdata)