Module: check_mk
Branch: master
Commit: 552620ea818e598a4c41d7b789861c2e55759abe
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=552620ea818e59…
Author: Andreas Boesl <ab(a)mathias-kettner.de>
Date: Mon Apr 4 15:05:12 2016 +0200
3021 FIX interface metrics: fixed broken interface metrics when using nagios core
The automatically generated pnp template for the interface bandwith was
broken. This problem only rises when the monitoring core is set to nagios.
---
.werks/3021 | 10 ++++++++++
ChangeLog | 2 ++
web/htdocs/metrics.py | 8 ++++++--
3 files changed, 18 insertions(+), 2 deletions(-)
diff --git a/.werks/3021 b/.werks/3021
new file mode 100644
index 0000000..1dbecea
--- /dev/null
+++ b/.werks/3021
@@ -0,0 +1,10 @@
+Title: interface metrics: fixed broken interface metrics when using nagios core
+Level: 1
+Component: multisite
+Compatible: compat
+Version: 1.2.9i1
+Date: 1459774881
+Class: fix
+
+The automatically generated pnp template for the interface bandwith was
+broken. This problem only rises when the monitoring core is set to nagios.
diff --git a/ChangeLog b/ChangeLog
index 34128aa..9fa55ea 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -121,6 +121,7 @@
* 3017 FIX: Fixed missing host/vms inventory information when having multiple
datacenters...
* 3018 FIX: netapp_api_disks: ignore disks with raid-state remote (metrocluster
setups)...
* 3019 FIX: netapp_api_volumes: fixed incorrect metrics (wrong scaling in graphs)
+ * 3111 FIX: citrix_status: fixed incorrect assignment of piggyback data to host
running the plugin...
* 3020 FIX: netapp_api_volumes: ignore volumes of cluster partner...
Multisite:
@@ -158,6 +159,7 @@
* 3345 FIX: Fixed exception when inventory painter was used as group painter
* 3347 FIX: Improved performance when having a lot of users...
* 3355 FIX: Fixed possible broken HW-/SW-Inventory history view
+ * 3021 FIX: interface metrics: fixed broken interface metrics when using nagios
core...
WATO:
* 3244 WATO BI Module: swap order of aggregation function and child node
selection...
diff --git a/web/htdocs/metrics.py b/web/htdocs/metrics.py
index 5bea619..a6403d8 100644
--- a/web/htdocs/metrics.py
+++ b/web/htdocs/metrics.py
@@ -1177,14 +1177,18 @@ def render_graph_pnp(graph_template, translated_metrics):
# TODO: beware of division by zero. All metrics are set to 1 here.
value, unit, color = evaluate(metric_name, translated_metrics)
+ expression, explicit_unit_name = metric_name.split("@", 1) #
isolate expression
+
# Choose a unique name for the derived variable and compute it
- commands += "CDEF:DERIVED%d=%s " % (nr , metric_name)
+ commands += "CDEF:DERIVED%d=%s " % (nr , expression)
if upside_down:
commands += "CDEF:DERIVED%d_NEG=DERIVED%d,-1,* " % (nr, nr)
metric_name = "DERIVED%d" % nr
# Scaling and upsidedown handling for legend
- commands += "CDEF:%s_LEGSCALED%s=%s,%f,/ " % (metric_name,
upside_down_suffix, metric_name, legend_scale * upside_down_factor)
+ commands += "CDEF:%s_LEGSCALED=%s,%f,/ " % (metric_name,
metric_name, legend_scale)
+ if upside_down:
+ commands += "CDEF:%s_LEGSCALED%s=%s,%f,/ " % (metric_name,
upside_down_suffix, metric_name, legend_scale * upside_down_factor)
else:
mi = translated_metrics[metric_name]