Module: check_mk
Branch: master
Commit: 08264024d5a64f6df9524a9ffb94d770bcb79cd8
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=08264024d5a64f…
Author: Konstantin Büttner <kb(a)mathias-kettner.de>
Date: Mon Jun 22 15:10:46 2015 +0200
citrix_serverload: Changed formatting of infotext to match citrix gui
---
checks/citrix_serverload | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/checks/citrix_serverload b/checks/citrix_serverload
index c2eac3a..eb91205 100644
--- a/checks/citrix_serverload
+++ b/checks/citrix_serverload
@@ -36,15 +36,19 @@ def check_citrix_serverload(_no_item, params, info):
try:
load = int(info[0][0])
except:
- return 3, "Load information not found"
+ yield 3, "Load information not found"
+ return
warn, crit = params
state = 0
+ if load == 20000:
+ yield 1, "License error"
+ load = 10000
if load >= crit:
state = 2
elif load >= warn:
state = 1
- return state, "Current Citrix Load is: " + str(load), [ ('perf',
load, warn, crit ) ]
+ yield state, "Current Citrix Load is: " + str(load/100) + "%", [
('perf', load, warn, crit ) ]
check_info["citrix_serverload"] = {
"group" : "citrix_load",