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 37e20ad2 authored by thl-cmk's avatar thl-cmk :flag_na:
Browse files

Delete agent_fritzbox_smarthome.py

parent 130e1460
No related branches found
No related tags found
No related merge requests found
#!/usr/bin/env python3
# -*- encoding: utf-8; py-indent-offset: 4 -*-
#
# modifications by thl-cmk[at]outlook[dot]com
# 2023-12-18: modified to work with cmk 2.2.x
# changed password to use password store
#
from cmk.gui.i18n import _
from cmk.gui.plugins.wato.special_agents.common import RulespecGroupDatasourceProgramsHardware
from cmk.gui.plugins.wato.utils import (
HostRulespec,
rulespec_registry,
IndividualOrStoredPassword,
)
from cmk.gui.valuespec import (
Dictionary,
FixedValue,
TextAscii,
Integer,
ValueSpec,
DropdownChoice,
)
def _valuespec_special_agents_fritzbox_smarthome() -> ValueSpec:
return Dictionary(
title=_("Fritz!Box Smarthome Devices"),
help=_("This rule selects the Fritz!Box agent, which uses HTTP to gather information "
"about configuration and connection status information."),
elements=[
('username',
TextAscii(
title=_('Username'),
help=_('Username for the Fritz!Box')
)),
("password", IndividualOrStoredPassword(
title=_("Password"),
allow_empty=False,
help=_('Password for the Fritz!Box.')
)),
('port',
Integer(
title=_('Port'),
default_value=443,
)),
('protocol',
DropdownChoice(
title=_('Protocol'),
choices=[
('http', 'HTTP'),
('https', 'HTTPS'),
],
default='https',
)),
('ssl', FixedValue(
value=0,
totext='',
title=_('Ignore SSL errors'),
)),
('prefix', FixedValue(
value=True,
help='Uses the hostname of the Fritz!Box as prefix for the hostnames generated for piggyback',
totext='',
title=_('Add Prefix'),
)),
('no_piggyback', FixedValue(
value=True,
help='The agent will not generate piggyback data. '
'The Smarthome devices will be attached to the this host.',
totext='',
title=_('Disable piggyback'),
)),
('testing', FixedValue(
value=True,
help='Development only, will be (most likely) ignored in production :-)',
totext='Add test data to the agent output',
title=_('Add test data'),
)),
],
required_keys=['username', 'password']
)
rulespec_registry.register(
HostRulespec(
group=RulespecGroupDatasourceProgramsHardware,
name="special_agents:fritzbox_smarthome",
valuespec=_valuespec_special_agents_fritzbox_smarthome,
))
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