Module: check_mk
Branch: master
Commit: 9f9d56cf1c7b5b84427dfbb8122f99d68da58d98
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=9f9d56cf1c7b5b…
Author: Andreas Boesl <ab(a)mathias-kettner.de>
Date: Mon Apr 20 15:42:16 2015 +0200
converted get_counter to get_rate
---
checks/netapp_api_cpu | 2 +-
checks/netapp_api_vf_stats | 4 ++--
checks/netapp_api_volumes | 2 +-
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/checks/netapp_api_cpu b/checks/netapp_api_cpu
index 8f192d9..133666c 100644
--- a/checks/netapp_api_cpu
+++ b/checks/netapp_api_cpu
@@ -41,7 +41,7 @@ def check_netapp_api_cpu_utilization(item, params, info):
cpu_busy = int(data["cpu_busy"])
num_cpus = int(data["num_processors"])
- timedif, ticks_per_sec = get_counter("netapp_api_cpu.utilization", now,
cpu_busy)
+ ticks_per_sec = get_rate("netapp_api_cpu.utilization", now, cpu_busy,
onwrap=RAISE)
cpusecs_per_sec = ticks_per_sec / 1000000.0
used_perc = 100.0 * cpusecs_per_sec
diff --git a/checks/netapp_api_vf_stats b/checks/netapp_api_vf_stats
index 3be9a70..b1323b6 100644
--- a/checks/netapp_api_vf_stats
+++ b/checks/netapp_api_vf_stats
@@ -41,7 +41,7 @@ def check_netapp_api_vf_stats_cpu_util(item, params, info):
now = time.time()
cpu_busy = int(vf["vfiler_cpu_busy"])
- timedif, ticks_per_sec = get_counter("netapp_api_vf_stats.cpu_util.%s"
% item, now, cpu_busy )
+ ticks_per_sec = get_rate("netapp_api_vf_stats.cpu_util.%s" % item, now,
cpu_busy, onwrap=RAISE)
cpusecs_per_sec = ticks_per_sec / 1000.0 / 1000 / 10000
used_perc = 100.0 * cpusecs_per_sec
@@ -87,7 +87,7 @@ def check_netapp_api_vf_stats_traffic(item, params, info):
("read_bytes",
"Read", 1024.0, 1024, "B/s"),
("write_bytes",
"Write", 1024.0, 1024, "B/s")]:
traffic = int(vf["vfiler_" + entry]) * factor
- timedif, ticks_per_sec =
get_counter("netapp_api_vf_stats.traffic.%s.%s" % (item, entry), now, traffic)
+ ticks_per_sec = get_rate("netapp_api_vf_stats.traffic.%s.%s" %
(item, entry), now, traffic)
yield 0, "%s: %s" % (name, get_bytes_human_readable(ticks_per_sec,
base = base, unit = unit)), [(entry, ticks_per_sec)]
diff --git a/checks/netapp_api_volumes b/checks/netapp_api_volumes
index 0af8698..d6bb34d 100644
--- a/checks/netapp_api_volumes
+++ b/checks/netapp_api_volumes
@@ -84,7 +84,7 @@ def check_netapp_api_volumes(item, params, parsed):
if value != None:
value = int(value)
try:
- timedif, delta = get_counter("netapp_api_volumes.%s.%s"
% (item, key), now, value)
+ delta = get_rate("netapp_api_volumes.%s.%s" % (item,
key), now, value, onwrap=RAISE)
perf.append( (key, delta) )
if protocol == "" and mode in ["read_",
"write_"]: