Module: check_mk
Branch: master
Commit: 851ea30970c66018dd16483a46983e7d8609beae
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=851ea30970c660…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Thu Jun 13 12:00:15 2013 +0200
Fix parameterhandling in winperf
---
checks/winperf | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/checks/winperf b/checks/winperf
index 3e397ff..db11ebe 100644
--- a/checks/winperf
+++ b/checks/winperf
@@ -40,6 +40,13 @@ def check_win_cpuusage(item, params, info):
# get parameters. Be nice to older installations that still use 'None'
# as parameters
if params == None:
+ params = winperf_cpu_default_levels # for legacy reasons
+ elif type(params) == tuple:
+ warn, crit = params
+ else:
+ warn, crit = params['levels']
+
+ if params == None:
params = winperf_cpu_default_levels
warn, crit = params