Module: check_mk
Branch: master
Commit: ff38acc2baa266a49c22bdc182eab3f7e0e4ac58
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=ff38acc2baa266…
Author: Goetz Golla <gg(a)mathias-kettner.de>
Date: Mon Jan 26 10:34:10 2015 +0100
netscaler_tcp_conns: small code cleanup
---
checks/netscaler_tcp_conns | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/checks/netscaler_tcp_conns b/checks/netscaler_tcp_conns
index 7613bfa..0d02c64 100644
--- a/checks/netscaler_tcp_conns
+++ b/checks/netscaler_tcp_conns
@@ -38,14 +38,13 @@ def inventory_netscaler_tcp_conns(info):
return[ (None, {}) ]
def check_netscaler_tcp_conns(_no_item, params, info):
- tcp_conns_types = {
- "server_conns": (0, "Server Connections"),
- "client_conns": (1, "Client Connections"),
- }
- for name, (index, infotext) in tcp_conns_types.iteritems():
+ for name, index, infotext in [
+ ("server_conns", 0, "Server Connections"),
+ ("client_conns", 1, "Client Connections"),
+ ]:
value = int(info[0][index])
infotext += ": %d" % value
- warn, crit = params.get(name)
+ warn, crit = params[name]
perfdata = [ (name, value, warn, crit, 0) ]