Module: check_mk
Branch: master
Commit: 61a4548ac12973d58e8f75cd15efabf5dfb510f9
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=61a4548ac12973…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Fri Nov 13 14:58:09 2015 +0100
Fixed error handling in case of non parsable perfdata
---
web/htdocs/metrics.py | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/web/htdocs/metrics.py b/web/htdocs/metrics.py
index 2f9595d..7ef039d 100644
--- a/web/htdocs/metrics.py
+++ b/web/htdocs/metrics.py
@@ -292,7 +292,11 @@ def parse_perf_data(perf_data_string, check_command=None):
return None, check_command
# Split the perf data string into parts. Preserve quoted strings!
- parts = split_perf_data(perf_data_string)
+ try:
+ parts = split_perf_data(perf_data_string)
+ except ValueError, e:
+ html.log("Failed to parse perfdata string: %s" % perf_data_string)
+ return None, check_command
# Try if check command is appended to performance data
# in a PNP like style