[checkmk-commits] Check_MK Git: check_mk: kemp_loadmaster_realserver check now uses ip address as item instead of index

Lutz Helwing lh at mathias-kettner.de
Wed Feb 18 17:07:47 CET 2015


Module: check_mk
Branch: master
Commit: fb5d75ce911bc9ad43fcf7ce714a5b375b4c62fc
URL:    http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=fb5d75ce911bc9ad43fcf7ce714a5b375b4c62fc

Author: Lutz Helwing <lh at mathias-kettner.de>
Date:   Wed Feb 18 17:07:36 2015 +0100

kemp_loadmaster_realserver check now uses ip address as item instead of index

---

 checks/kemp_loadmaster_realserver |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/checks/kemp_loadmaster_realserver b/checks/kemp_loadmaster_realserver
index 7fad856..ede323b 100644
--- a/checks/kemp_loadmaster_realserver
+++ b/checks/kemp_loadmaster_realserver
@@ -37,7 +37,7 @@
 def inventory_kemp_loadmaster_realserver(info):
     for line in info:
         if line[2] != '4': # Skip disabled servers
-            yield line[1], None
+            yield line[0], None
 
 
 def check_kemp_loadmaster_realserver(item, _no_params, info):
@@ -50,9 +50,9 @@ def check_kemp_loadmaster_realserver(item, _no_params, info):
     }
 
     for ipaddress, server_id, state_id in info:
-        if item == server_id:
+        if item == ipaddress:
             state, state_name = states[state_id]
-            return state, "State: %s, IP: %s" % (state_name, ipaddress)
+            return state, "State: %s" % state_name
 
 
 check_info["kemp_loadmaster_realserver"] = {



More information about the checkmk-commits mailing list