Module: check_mk
Branch: master
Commit: 86f6b067a056b0074e5f6ce687258ad52be9aae3
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=86f6b067a056b0…
Author: Simon Betz <si(a)mathias-kettner.de>
Date: Thu Feb 16 10:33:23 2017 +0100
4361 FIX if.include: fixed ifGroup handling if agent already sends interface groups
Change-Id: I069a8c506d7d2541b85e26c94a0ab8cfe61a0a1b
---
.werks/4361 | 10 ++++++++++
checks/if.include | 4 +++-
2 files changed, 13 insertions(+), 1 deletion(-)
diff --git a/.werks/4361 b/.werks/4361
new file mode 100644
index 0000000..4e768ac
--- /dev/null
+++ b/.werks/4361
@@ -0,0 +1,10 @@
+Title: if.include: fixed ifGroup handling if agent already sends interface groups
+Level: 1
+Component: checks
+Class: fix
+Compatible: compat
+State: unknown
+Version: 1.5.0i1
+Date: 1487237526
+
+
diff --git a/checks/if.include b/checks/if.include
index f742e67..1aa0351 100644
--- a/checks/if.include
+++ b/checks/if.include
@@ -397,7 +397,9 @@ def inventory_if_common(info, has_nodeinfo = False):
if ifGroup:
have_groups.setdefault(ifGroup, {
"interfaces" : [],
- "group_patterns" : {g_hostname : {}},
+ "group_type" : "single_host",
+ "group_presence" : "instead",
+ "group_patterns" : {g_hostname : {"items" : [],
"iftype" : ifType}},
})
have_groups[ifGroup]["interfaces"].append(
(saveint(ifSpeed), ifOperStatus, ifType))