Module: check_mk
Branch: master
Commit: b3f98feabf7b195e53dafec35340b3266ae29361
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=b3f98feabf7b19…
Author: Andreas Boesl <ab(a)mathias-kettner.de>
Date: Wed May 9 15:01:29 2018 +0200
5810 FIX CMC Graphs: fixed incorrect fallback to pnp4nagios graphs in case some sites are
disabled
The detection routine, which determines if CMC-graphs are possible could fail when a
remote site
was down or unreachable. Furthermore, it didn't matter if the site in question had the
actual
rrd data for the graph, so it could have been any site.
As fallback, pnp4nagios graphs were used - which may lead to other display errors.
Change-Id: Icc194b2edb92983991d560813d8725ef4de25346
---
.werks/5810 | 15 +++++++++++++++
web/htdocs/metrics.py | 2 +-
2 files changed, 16 insertions(+), 1 deletion(-)
diff --git a/.werks/5810 b/.werks/5810
new file mode 100644
index 0000000..79ee7ae
--- /dev/null
+++ b/.werks/5810
@@ -0,0 +1,15 @@
+Title: CMC Graphs: fixed incorrect fallback to pnp4nagios graphs in case some sites are
disabled
+Level: 1
+Component: multisite
+Class: fix
+Compatible: compat
+Edition: cee
+State: unknown
+Version: 1.6.0i1
+Date: 1525870437
+
+The detection routine, which determines if CMC-graphs are possible could fail when a
remote site
+was down or unreachable. Furthermore, it didn't matter if the site in question had
the actual
+rrd data for the graph, so it could have been any site.
+
+As fallback, pnp4nagios graphs were used - which may lead to other display errors.
diff --git a/web/htdocs/metrics.py b/web/htdocs/metrics.py
index c89af06..a79bf68 100644
--- a/web/htdocs/metrics.py
+++ b/web/htdocs/metrics.py
@@ -1619,7 +1619,7 @@ def site_is_running_cmc(site_id):
return sites.state(site_id, {}).get("program_version",
"").startswith("Check_MK")
else:
for status in sites.states().values():
- if status.get("program_version").startswith("Check_MK"):
+ if status.get("program_version",
"").startswith("Check_MK"):
return True
return False