Module: check_mk
Branch: master
Commit: 14a7a0c5acddad3c5668b4cd1f1c78c7847cc0f4
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=14a7a0c5acddad…
Author: Simon Betz <si(a)mathias-kettner.de>
Date: Thu Nov 12 12:56:53 2015 +0100
minor cleanup in dhcp_pools.include
---
checks/dhcp_pools.include | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/checks/dhcp_pools.include b/checks/dhcp_pools.include
index a44f276..229a657 100644
--- a/checks/dhcp_pools.include
+++ b/checks/dhcp_pools.include
@@ -36,7 +36,7 @@ def check_dhcp_pools_levels(free, used, pending, size, params):
if type(params) == tuple:
# In case of win_dhcp_pools old params are percent but of type
# integer, thus we have to change them into floats
- params = {"free_leases" : (1.0 * params[0], 1.0 * params[1])}
+ params = {"free_leases" : (float(params[0]), float(params[1]))}
for what, value in [("free", free), ("used", used)]:
state = 0
@@ -45,6 +45,7 @@ def check_dhcp_pools_levels(free, used, pending, size, params):
infotext = "%s: %d leases (%.1f%%)" % (what, value, value_perc)
if params.get("%s_leases" % what, ""):
warn, crit = params["%s_leases" % what]
+ print what, warn, crit
if type(warn) == float: # here we have levels in percent
value = value_perc
text_format = "%.1f"