Module: check_mk
Branch: master
Commit: 6dccda7c7d17b5ce9e3c2c5efc4a28e77cfb8386
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=6dccda7c7d17b5…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Thu Mar 7 11:14:55 2019 +0100
7230 FIX Fixed selection of checks in "Check intervals for SNMP checks" ruleset
Instead of selecting individual check types as it was possible before, the section names
are now selectable as it was intended. As described in help text of this option it is
not possible to configured this setting for individual sub checks, but only for a family
of SNMP checks that share a single SNMP section.
FEED-3402
Change-Id: Ie1948a4478451a9961a06fb0503a7d4e229db73a
---
.werks/7230 | 14 ++++++++++++++
cmk/gui/plugins/wato/check_mk_configuration.py | 5 +++--
2 files changed, 17 insertions(+), 2 deletions(-)
diff --git a/.werks/7230 b/.werks/7230
new file mode 100644
index 0000000..85be0d1
--- /dev/null
+++ b/.werks/7230
@@ -0,0 +1,14 @@
+Title: Fixed selection of checks in "Check intervals for SNMP checks" ruleset
+Level: 1
+Component: wato
+Class: fix
+Compatible: compat
+Edition: cre
+State: unknown
+Version: 1.6.0i1
+Date: 1551884231
+
+Instead of selecting individual check types as it was possible before, the section names
+are now selectable as it was intended. As described in help text of this option it is
+not possible to configured this setting for individual sub checks, but only for a family
+of SNMP checks that share a single SNMP section.
diff --git a/cmk/gui/plugins/wato/check_mk_configuration.py
b/cmk/gui/plugins/wato/check_mk_configuration.py
index 68c3ef2..58dc6c9 100644
--- a/cmk/gui/plugins/wato/check_mk_configuration.py
+++ b/cmk/gui/plugins/wato/check_mk_configuration.py
@@ -4956,8 +4956,9 @@ def get_snmp_checktypes():
def get_snmp_section_names():
checks = watolib.check_mk_local_automation("get-check-information")
- return [(None, _('All SNMP Checks'))] + sorted(
- [(cn, cn) for (cn, c) in checks.items() if c['snmp']])
+ snmp_section_names = set(cn.split(".", 1)[0] for (cn, c) in checks.items()
if c['snmp'])
+ section_choices = [ (sn, sn) for sn in snmp_section_names ]
+ return [ (None, _('All SNMP Checks')) ] + sorted(section_choices)
@rulespec_registry.register