Collection of CheckMK checks (see https://checkmk.com/). All checks and plugins are provided as is. Absolutely no warranty. Send any comments to thl-cmk[at]outlook[dot]com

Skip to content
Snippets Groups Projects
Commit 9185d999 authored by thl-cmk's avatar thl-cmk :flag_na:
Browse files

update project

parent 83324e55
No related branches found
No related tags found
No related merge requests found
[PACKAGE]: ../../raw/master/mkp/unbound-1.2.1-20240514.mkp "unbound-1.2.1-20240514.mkp"
[PACKAGE]: ../../raw/master/mkp/unbound-1.2.2-20240521.mkp "unbound-1.2.2-20240521.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/
......
File added
#!/bin/sh
echo '<<<unbound:sep(61)>>>'
unbound-control stats_noreset
echo '<<<>>>'
PLUGIN_CONF_DIR="/etc/check_mk"
UNBOUND_CFG="/etc/unbound/unbound.conf"
if [ -f "$MK_CONFDIR/unbound.cfg" ]; then
. "$MK_CONFDIR/unbound.cfg" 2>/dev/null
elif [ -f "$PLUGIN_CONF_DIR/unbound.cfg" ]; then
. "$PLUGIN_CONF_DIR/unbound.cfg" 2>/dev/null
fi
if [ -f "$(which unbound-control)" ]; then
echo '<<<unbound:sep(61)>>>'
unbound-control stats_noreset -c $UNBOUND_CFG
echo '<<<>>>'
fi
......@@ -35,24 +35,35 @@ from cmk.gui.cee.plugins.wato.agent_bakery.rulespecs.utils import (
RulespecGroupMonitoringAgentsAgentPlugins,
)
from cmk.gui.valuespec import Alternative, FixedValue
from cmk.gui.valuespec import (
Alternative,
Dictionary,
FixedValue,
TextInput,
)
def _parameter_valuespec_unbound_bakery():
return Alternative(
title=_('unbound'),
title='Unbound',
elements=[
FixedValue(
True,
title=_('Deploy the unbound agent plugin'),
totext=_('The unbound agent plugin will be deployed')
),
Dictionary(
title='Deploy the unbound agent plugin',
elements=[
('config_file_path',
TextInput(
title=_('Path of config file'),
size=100,
allow_empty=False,
placeholder='/etc/unbound/unbound.conf',
))
]),
FixedValue(
None,
title=_('Do not deploy the unbound agent plugin'),
totext=_('The unbound agent plugin will not be deployed')
),
],
]
)
......
......@@ -16,6 +16,7 @@ from pathlib import Path
from cmk.base.cee.plugins.bakery.bakery_api.v1 import (
FileGenerator,
PluginConfig,
OS,
Plugin,
register
......@@ -23,11 +24,17 @@ from cmk.base.cee.plugins.bakery.bakery_api.v1 import (
def get_unbound_files(conf) -> FileGenerator:
if conf is True:
if conf:
yield Plugin(
base_os=OS.LINUX,
source=Path('unbound'),
)
if config_file_path := conf.get('config_file_path'):
yield PluginConfig(
base_os=OS.LINUX,
lines=[f'UNBOUND_CFG={config_file_path}'],
target=Path('unbound.cfg'),
)
register.bakery_plugin(
......
......@@ -15,7 +15,7 @@
'lib': ['python3/cmk/base/cee/plugins/bakery/unbound.py']},
'name': 'unbound',
'title': 'Unbound',
'version': '1.2.1-20240514',
'version': '1.2.2-20240521',
'version.min_required': '2.2.0b1',
'version.packaged': '2.2.0p24',
'version.usable_until': None}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment