[checkmk-commits] Check_MK Git: check_mk: Fix inventory of switch ports on Viprinet-Routers

Mathias Kettner mk at mathias-kettner.de
Fri Apr 24 10:43:55 CEST 2015


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

Author: Mathias Kettner <mk at mathias-kettner.de>
Date:   Fri Apr 24 10:43:51 2015 +0200

Fix inventory of switch ports on Viprinet-Routers

---

 inventory/if |    3 +++
 1 file changed, 3 insertions(+)

diff --git a/inventory/if b/inventory/if
index 38959b9..bc92639 100644
--- a/inventory/if
+++ b/inventory/if
@@ -35,6 +35,9 @@ def inv_if(info):
         if if_type in ( "231", "232" ):
             continue # Useless entries for "TenGigabitEthernet2/1/21--Uncontrolled"
 
+        if not if_last_change or not if_speed:
+            continue # Ignore useless half-empty tables (e.g. Viprinet-Router)
+
         # if_last_change can be of type Timeticks (100th of seconds) or
         # a human readable time stamp (yurks)
         try:



More information about the checkmk-commits mailing list