diff --git a/README.md b/README.md index 9f2f9721eadefcc105cf562a2faa5fe6770dc5b4..4bf67e2c8553f5e3bc4817b9f3df051a33bcf554 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -[PACKAGE]: ../../raw/master/mkp/unbound-1.2.0-20240421.mkp "unbound-1.2.0-20240421.mkp" +[PACKAGE]: ../../raw/master/mkp/unbound-1.2.1-20240514.mkp "unbound-1.2.1-20240514.mkp" # unbound This agent plugin cheks the state of the unbound dns daemon. For more information about unbound see: https://nlnetlabs.nl/projects/unbound/about/ diff --git a/mkp/unbound-1.2.1-20240514.mkp b/mkp/unbound-1.2.1-20240514.mkp new file mode 100644 index 0000000000000000000000000000000000000000..0e5b612ea06b6266c4ca3f242a288c62c471d306 Binary files /dev/null and b/mkp/unbound-1.2.1-20240514.mkp differ diff --git a/source/gui/wato/check_parameters/unbound.py b/source/gui/wato/check_parameters/unbound.py index 5e52a07f2063f156e8af1d1d31604ab6ca7286fb..6e01e01560041449c08e1f21f3a27dfd93dba4bb 100644 --- a/source/gui/wato/check_parameters/unbound.py +++ b/source/gui/wato/check_parameters/unbound.py @@ -24,20 +24,25 @@ # added ruleset for bakery # renamed to unbound.py (from unbound_parameters.py) # moved to ~/local/lib/check_mk/gui/plugins/wato/check_parameters (from local/share/check_mk/web/plugins/wato) -# +# 2024-05-14: separated WATO for bakery and check in two files + from cmk.gui.i18n import _ from cmk.gui.plugins.wato.utils import ( CheckParameterRulespecWithoutItem, - rulespec_registry, RulespecGroupCheckParametersApplications, - HostRulespec, -) -from cmk.gui.cee.plugins.wato.agent_bakery.rulespecs.utils import ( - RulespecGroupMonitoringAgentsAgentPlugins, + rulespec_registry, ) -from cmk.gui.valuespec import Dictionary, Float, Percentage, Tuple, Alternative, FixedValue + +from cmk.gui.valuespec import ( + Alternative, + Dictionary, + FixedValue, + Float, + Percentage, + Tuple, +) def _parameter_valuespec_unbound_cache(): @@ -136,30 +141,3 @@ rulespec_registry.register( title=lambda: _("Unbound Answers"), ) ) - - -def _parameter_valuespec_unbound_bakery(): - return Alternative( - title=_('unbound'), - elements=[ - FixedValue( - True, - title=_('Deploy the unbound agent plugin'), - totext=_('The unbound agent plugin will be deployed') - ), - FixedValue( - None, - title=_('Do not deploy the unbound agent plugin'), - totext=_('The unbound agent plugin will not be deployed') - ), - ], - ) - - -rulespec_registry.register( - HostRulespec( - group=RulespecGroupMonitoringAgentsAgentPlugins, - name='agent_config:unbound', - valuespec=_parameter_valuespec_unbound_bakery, - ) -) diff --git a/source/gui/wato/check_parameters/unbound_bakery.py b/source/gui/wato/check_parameters/unbound_bakery.py new file mode 100644 index 0000000000000000000000000000000000000000..525038ded77f5de739da6cbc2108d83b5cb0d6d9 --- /dev/null +++ b/source/gui/wato/check_parameters/unbound_bakery.py @@ -0,0 +1,65 @@ +#!/usr/bin/env python3 +# -*- coding: utf-8 -*- + +# Copyright (C) 2022, Jan-Philipp Litza (PLUTEX) <jpl@plutex.de>. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License along +# with this program; if not, write to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +# modifications by thl-cmk[at]outlook[dot]com +# 2024-04-21: fixed missing FixedValue in import +# changed Alternative titles to "Upper levels in qps"/"Upper levels in %" to better differentiate between them +# added explicit unit "%2 +# added ruleset for bakery +# renamed to unbound.py (from unbound_parameters.py) +# moved to ~/local/lib/check_mk/gui/plugins/wato/check_parameters (from local/share/check_mk/web/plugins/wato) +# 2024-05-14: separated WATO for bakery and check in two files + +from cmk.gui.i18n import _ +from cmk.gui.plugins.wato.utils import ( + HostRulespec, + rulespec_registry, +) +from cmk.gui.cee.plugins.wato.agent_bakery.rulespecs.utils import ( + RulespecGroupMonitoringAgentsAgentPlugins, +) + +from cmk.gui.valuespec import Alternative, FixedValue + + +def _parameter_valuespec_unbound_bakery(): + return Alternative( + title=_('unbound'), + elements=[ + FixedValue( + True, + title=_('Deploy the unbound agent plugin'), + totext=_('The unbound agent plugin will be deployed') + ), + FixedValue( + None, + title=_('Do not deploy the unbound agent plugin'), + totext=_('The unbound agent plugin will not be deployed') + ), + ], + ) + + +rulespec_registry.register( + HostRulespec( + group=RulespecGroupMonitoringAgentsAgentPlugins, + name='agent_config:unbound', + valuespec=_parameter_valuespec_unbound_bakery, + ) +) diff --git a/source/packages/unbound b/source/packages/unbound index 5741833e738d9d625c6d90f3deebeda552341e49..517e0450f73c524b6e7ae39f4ef1c4b978e6265e 100644 --- a/source/packages/unbound +++ b/source/packages/unbound @@ -9,11 +9,13 @@ 'download_url': 'https://github.com/PLUTEX/checkmk-unbound/', 'files': {'agent_based': ['unbound.py'], 'agents': ['plugins/unbound'], - 'gui': ['metrics/unbound.py', 'wato/check_parameters/unbound.py'], + 'gui': ['metrics/unbound.py', + 'wato/check_parameters/unbound.py', + 'wato/check_parameters/unbound_bakery.py'], 'lib': ['python3/cmk/base/cee/plugins/bakery/unbound.py']}, 'name': 'unbound', 'title': 'Unbound', - 'version': '1.2.0-20240421', + 'version': '1.2.1-20240514', 'version.min_required': '2.2.0b1', 'version.packaged': '2.2.0p24', 'version.usable_until': None}