Module: check_mk
Branch: master
Commit: b2aa592080c5294ac31c6046b1d78ea656cd06fa
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=b2aa592080c529…
Author: Andreas Boesl <ab(a)mathias-kettner.de>
Date: Tue Sep 9 14:44:50 2014 +0200
perfmeter check_http: prevent exception if perfdata is missing (startup problem)
---
web/plugins/perfometer/active_checks.py | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/web/plugins/perfometer/active_checks.py
b/web/plugins/perfometer/active_checks.py
index 277388a..62c29fc 100644
--- a/web/plugins/perfometer/active_checks.py
+++ b/web/plugins/perfometer/active_checks.py
@@ -35,7 +35,10 @@ perfometers["check_tcp"] = perfometer_check_tcp
perfometers["check_mk_active-tcp"] = perfometer_check_tcp
def perfometer_check_http(row, check_command, perfdata):
- time_ms = float(perfdata[0][1]) * 1000.0
+ try:
+ time_ms = float(perfdata[0][1]) * 1000.0
+ except:
+ time_ms = 0
return "%.1f ms" % time_ms, \
perfometer_logarithmic(time_ms, 1000, 10, "#66ccff")