Module: check_mk
Branch: master
Commit: c29233e58c27b1e31ed9bae7b9b60f8daef5d4c0
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=c29233e58c27b1…
Author: Florian Heigl <fh(a)mathias-kettner.de>
Date: Mon Mar 19 17:02:02 2012 +0100
win_dhcp_pools: do not alert if a pool is unusued with no configured ip ranges
---
checks/win_dhcp_pools | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/checks/win_dhcp_pools b/checks/win_dhcp_pools
index b6f57e2..ff9b234 100644
--- a/checks/win_dhcp_pools
+++ b/checks/win_dhcp_pools
@@ -104,6 +104,10 @@ def check_win_dhcp_pools(item, params, info):
used, free, pending = poolStats
size = used + free + pending
+ # Catch unused pools
+ if size == 0:
+ return (3, "UNKNOWN - DHCP Pool contains no IP addresses")
+
if free > 0:
percFree = 100 - size / free
else: