Module: check_mk
Branch: master
Commit: 8b14148e3e779549d80cb4d0391a0b09746733a4
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=8b14148e3e7795…
Author: Simon Betz <si(a)mathias-kettner.de>
Date: Tue Sep 15 11:57:51 2015 +0200
fixed storage processor utilization calculation in emcvnx_sp_util
---
checks/emcvnx_sp_util | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/checks/emcvnx_sp_util b/checks/emcvnx_sp_util
index bfdbfd0..8ebbdf1 100644
--- a/checks/emcvnx_sp_util
+++ b/checks/emcvnx_sp_util
@@ -43,8 +43,11 @@ def check_emcvnx_sp_util(item, params, info):
elif len(line) == 2 and "idle" in line[0]:
idle_ticks = float(line[1])
+ now = time.time()
warn, crit = params
- sp_util = get_rate(None, time.time(), busy_ticks / (busy_ticks + idle_ticks) )
+ busy_ticks_rate = get_rate("emcvnx_sp_util.busy_ticks", now, busy_ticks )
+ idle_ticks_rate = get_rate("emcvnx_sp_util.idle_ticks", now, idle_ticks )
+ sp_util = 100 * (busy_ticks_rate / (busy_ticks_rate + idle_ticks_rate))
infotext = "%.1f%%" % sp_util
if sp_util >= crit:
state = 2