Module: check_mk
Branch: master
Commit: 398fcebb9138eb693a044b406f79c4c9773b6ec2
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=398fcebb9138eb…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Thu Sep 17 09:46:57 2015 +0200
esx_vsphere_hostsystem fortigate_cpu fortigate_cpu_base netapp_api_cpu
netapp_api_vf_stats: Fixed broken cpu checks after check_cpu_util API change
---
checks/esx_vsphere_hostsystem | 6 +++---
checks/fortigate_cpu | 2 +-
checks/fortigate_cpu_base | 2 +-
checks/netapp_api_cpu | 2 +-
checks/netapp_api_vf_stats | 2 +-
5 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/checks/esx_vsphere_hostsystem b/checks/esx_vsphere_hostsystem
index 9f361e0..bdb2aed 100644
--- a/checks/esx_vsphere_hostsystem
+++ b/checks/esx_vsphere_hostsystem
@@ -73,7 +73,7 @@ def check_esx_vsphere_hostsystem_cpu(item, params, info):
# Convert legacy parameters
this_time = time.time()
- state, infotext, perfdata = check_cpu_util(usage, params)
+ state, infotext, perfdata = check_cpu_util(usage, params).next()
infotext += ", %.2fGHz/%.2fGHz" % (used_mhz / 1024.0, total_mhz / 1024.0)
infotext += ", %d sockets, %d cores/socket, %d threads" % (
@@ -201,10 +201,10 @@ def check_esx_vsphere_hostsystem_cpu_util_cluster(item, params,
info):
sorted_params = sorted(params, reverse = True)
for count, levels in sorted_params:
if node_count >= count:
- state, infotext, perfdata = check_cpu_util(usage, levels)
+ state, infotext, perfdata = check_cpu_util(usage, levels).next()
break
else:
- state, infotext, perfdata = check_cpu_util(usage, None)
+ state, infotext, perfdata = check_cpu_util(usage, None).next()
yield 0, "%d Nodes" % node_count
yield 0, "%.2fGHz/%.2fGHz" % (sum_used / 1024.0, sum_total / 1024.0)
diff --git a/checks/fortigate_cpu b/checks/fortigate_cpu
index 3265a93..2dde69a 100644
--- a/checks/fortigate_cpu
+++ b/checks/fortigate_cpu
@@ -40,7 +40,7 @@ def check_fortigate_cpu(item, params, info):
util = float(util) / num_cpus
- state, infotext, perfdata = check_cpu_util(util, params)
+ state, infotext, perfdata = check_cpu_util(util, params).next()
infotext += " at %d CPUs" % num_cpus
return state, infotext, perfdata
diff --git a/checks/fortigate_cpu_base b/checks/fortigate_cpu_base
index e198863..8f0c35b 100644
--- a/checks/fortigate_cpu_base
+++ b/checks/fortigate_cpu_base
@@ -40,7 +40,7 @@ def check_fortigate_cpu_base(item, params, info):
util = float(util) / num_cpus
- state, infotext, perfdata = check_cpu_util(util, params)
+ state, infotext, perfdata = check_cpu_util(util, params).next()
infotext += " at %d CPUs" % num_cpus
return state, infotext, perfdata
diff --git a/checks/netapp_api_cpu b/checks/netapp_api_cpu
index 133666c..eb85a86 100644
--- a/checks/netapp_api_cpu
+++ b/checks/netapp_api_cpu
@@ -52,7 +52,7 @@ def check_netapp_api_cpu_utilization(item, params, info):
elif used_perc > 100:
used_perc = 100
- state, infotext, perfdata = check_cpu_util(used_perc, params, now)
+ state, infotext, perfdata = check_cpu_util(used_perc, params, now).next()
perfdata[0] = perfdata[0][:5] + (num_cpus,)
infotext += ", %d CPUs" % num_cpus
return state, infotext, perfdata
diff --git a/checks/netapp_api_vf_stats b/checks/netapp_api_vf_stats
index b1323b6..3e5243e 100644
--- a/checks/netapp_api_vf_stats
+++ b/checks/netapp_api_vf_stats
@@ -52,7 +52,7 @@ def check_netapp_api_vf_stats_cpu_util(item, params, info):
elif used_perc > 100:
used_perc = 100
- state, infotext, perfdata = check_cpu_util(used_perc, params, now)
+ state, infotext, perfdata = check_cpu_util(used_perc, params, now).next()
perfdata[0] = perfdata[0][:5]
return state, infotext, perfdata