Module: check_mk
Branch: master
Commit: e4c9a8b48425b0e258cf4203ee31d0ecac25dec1
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=e4c9a8b48425b0…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Fri Mar 18 18:03:11 2016 +0100
Better error message in painter in case of missing RRDs
---
web/plugins/views/painters.py | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/web/plugins/views/painters.py b/web/plugins/views/painters.py
index 6fff243..fa4abb2 100644
--- a/web/plugins/views/painters.py
+++ b/web/plugins/views/painters.py
@@ -948,6 +948,16 @@ def paint_time_graph_cmk(row, show_timeranges=False):
graph_data_range = { "time_range" :
get_graph_timerange_from_painter_options() }
graph_render_options = {}
+ if "host_metrics" in row:
+ metrics = row["host_metrics"]
+ perf_data = row["host_perf_data"]
+ else:
+ metrics = row["service_metrics"]
+ perf_data = row["service_perf_data"]
+
+ if not metrics and perf_data:
+ return "", _("No historic metrics recorded.")
+
return "", metrics.render_graphs_from_specification_html(
graph_specification,
graph_data_range,