Module: check_mk
Branch: master
Commit: de775aca7e28438a508599c8a4f737d529eb1a01
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=de775aca7e2843…
Author: Simon Betz <si(a)mathias-kettner.de>
Date: Tue Apr 2 14:49:17 2019 +0200
7361 FIX lnx_if: Ignore docker veth* interfaces when inventorizing Linux interfaces
Change-Id: I8a8767788d31f017cf831cafb3d7c3a2fc5228ac
---
.werks/7361 | 11 +++++++++++
inventory/lnx_if | 4 ++++
2 files changed, 15 insertions(+)
diff --git a/.werks/7361 b/.werks/7361
new file mode 100644
index 0000000..b15da95
--- /dev/null
+++ b/.werks/7361
@@ -0,0 +1,11 @@
+Title: lnx_if: Ignore docker veth* interfaces when inventorizing Linux interfaces
+Level: 1
+Component: inv
+Compatible: compat
+Edition: cre
+Version: 1.6.0i1
+Date: 1554209263
+Class: fix
+
+See Werk 5946 for detailed information. Inventorizing these docker
+interface may led to superfluous inventory changes.
diff --git a/inventory/lnx_if b/inventory/lnx_if
index edd49c5..6b5c297 100644
--- a/inventory/lnx_if
+++ b/inventory/lnx_if
@@ -43,6 +43,10 @@ def inv_lnx_if(parsed, params):
_if_in_errors, _if_out_octets, _outucast, _outmcast, _outbcast, \
_if_out_discards, _if_out_errors, _if_out_qlen, if_alias, if_phys_address in
parsed:
+ if if_descr.startswith("veth"):
+ # Always exclude dockers veth* interfaces on docker nodes
+ continue
+
if if_type in ("231", "232"):
continue # Useless entries for
"TenGigabitEthernet2/1/21--Uncontrolled"
# Ignore useless half-empty tables (e.g. Viprinet-Router)