esx_vsphere_hostsystem.cpu_util_cluster: Fix min/max values in perfdata
Message-ID: <59c110b5.UVBNhGoJwCux74d4%kb(a)mathias-kettner.de>
User-Agent: Heirloom mailx 12.5 6/20/10
MIME-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit
Module: check_mk
Branch: master
Commit: 2fb7fb1340c428ea4ab7158d64404b8eac0a3a0f
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=2fb7fb1340c428…
Author: Konstantin Büttner <kb(a)mathias-kettner.de>
Date: Tue Sep 19 14:31:20 2017 +0200
5221 FIX esx_vsphere_hostsystem.cpu_usage, esx_vsphere_hostsystem.cpu_util_cluster: Fix
min/max values in perfdata
Change-Id: Ia750ae17158476a3bb2bad8fec86b405a687c755
---
.werks/5221 | 10 ++++++++++
checks/esx_vsphere_hostsystem | 10 ----------
2 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/.werks/5221 b/.werks/5221
new file mode 100644
index 0000000..d772499
--- /dev/null
+++ b/.werks/5221
@@ -0,0 +1,10 @@
+Title: esx_vsphere_hostsystem.cpu_usage, esx_vsphere_hostsystem.cpu_util_cluster: Fix
min/max values in perfdata
+Level: 1
+Component: checks
+Class: fix
+Compatible: compat
+Edition: cre
+State: unknown
+Version: 1.5.0i1
+Date: 1505824220
+
diff --git a/checks/esx_vsphere_hostsystem b/checks/esx_vsphere_hostsystem
index ac305f4..45b36dc 100644
--- a/checks/esx_vsphere_hostsystem
+++ b/checks/esx_vsphere_hostsystem
@@ -83,11 +83,6 @@ def check_esx_vsphere_hostsystem_cpu(item, params, info):
infotext += ", %d sockets, %d cores/socket, %d threads" % (
num_sockets, num_cores / num_sockets, num_threads)
- # put number of threads as MAX value for first perf-data. This
- # is needed by the PNP template.
- perfdata_cpu = list(perfdata[0])
- perfdata_cpu[-1] = num_threads
- perfdata = [ tuple(perfdata_cpu) ] + perfdata[1:]
return (state, infotext, perfdata)
@@ -218,11 +213,6 @@ def check_esx_vsphere_hostsystem_cpu_util_cluster(item, params,
info):
yield 0, "%.2fGHz/%.2fGHz" % (sum_used / 1024.0, sum_total / 1024.0)
yield 0, "%d threads" % sum_threads
- # put number of threads as MAX value for first perf-data. This
- # is needed by the PNP template.
- perfdata_cpu = list(perfdata[0])
- perfdata_cpu[-1] = sum_threads
- perfdata = [ tuple(perfdata_cpu) ] + perfdata[1:]
yield state, infotext, perfdata