2023-12-02 13:49:10 +01:00
|
|
|
from cmk.gui.i18n import _
|
2024-06-26 16:33:15 +02:00
|
|
|
from cmk.gui.plugins.wato import (
|
|
|
|
CheckParameterRulespecWithItem,
|
2023-12-02 13:49:10 +01:00
|
|
|
rulespec_registry,
|
2024-06-26 16:33:15 +02:00
|
|
|
RulespecGroupCheckParametersOperatingSystem,
|
2023-12-02 13:49:10 +01:00
|
|
|
)
|
|
|
|
|
|
|
|
from cmk.gui.valuespec import (
|
2024-06-26 16:33:15 +02:00
|
|
|
Age,
|
|
|
|
Alternative,
|
|
|
|
CascadingDropdown,
|
|
|
|
Checkbox,
|
2023-12-02 13:49:10 +01:00
|
|
|
Dictionary,
|
2024-06-26 16:33:15 +02:00
|
|
|
DictionaryElements,
|
|
|
|
DropdownChoice,
|
|
|
|
FixedValue,
|
|
|
|
Float,
|
|
|
|
HostAddress,
|
|
|
|
Hostname,
|
|
|
|
HTTPUrl,
|
|
|
|
ID,
|
|
|
|
Integer,
|
|
|
|
ListChoice,
|
|
|
|
ListOf,
|
|
|
|
ListOfStrings,
|
|
|
|
MonitoringState,
|
|
|
|
NetworkPort,
|
2023-12-02 13:49:10 +01:00
|
|
|
Password,
|
2024-06-26 16:33:15 +02:00
|
|
|
RegExp,
|
2023-12-02 15:20:26 +01:00
|
|
|
TextAscii,
|
2024-06-26 16:33:15 +02:00
|
|
|
TextInput,
|
|
|
|
Transform,
|
|
|
|
Tuple,
|
2023-12-02 13:49:10 +01:00
|
|
|
)
|
|
|
|
|
2024-06-26 16:33:15 +02:00
|
|
|
from cmk.gui.plugins.wato import (
|
2023-12-02 13:49:10 +01:00
|
|
|
HostRulespec,
|
2024-06-26 16:33:15 +02:00
|
|
|
IndividualOrStoredPassword,
|
2023-12-02 13:49:10 +01:00
|
|
|
)
|
2025-01-12 16:16:12 +01:00
|
|
|
from cmk.gui.plugins.wato.datasource_programs import RulespecGroupDatasourceProgramsCustom
|
2023-12-02 13:49:10 +01:00
|
|
|
|
|
|
|
def _params_special_agent_hal9001():
|
|
|
|
return Dictionary(
|
|
|
|
title=_("Login parameters for HAL9001 systems"),
|
|
|
|
help = _("HAL9001: Dedicated to Arthur C. Clarke"),
|
|
|
|
elements=[
|
2023-12-02 15:20:26 +01:00
|
|
|
("username", TextAscii(
|
|
|
|
title=_("Username"),
|
2023-12-02 13:49:10 +01:00
|
|
|
allow_empty=False,
|
|
|
|
help=_("Username with administrative rights, mandatory"))),
|
2023-12-02 15:20:26 +01:00
|
|
|
("password", Password(
|
|
|
|
title=_("Password"),
|
2023-12-02 13:49:10 +01:00
|
|
|
allow_empty=False,
|
2023-12-02 15:20:26 +01:00
|
|
|
help=_("Specify password of this user, mandatory"))),
|
2023-12-02 13:49:10 +01:00
|
|
|
],
|
|
|
|
optional_keys=[],
|
|
|
|
)
|
|
|
|
|
|
|
|
rulespec_registry.register(
|
|
|
|
HostRulespec(
|
2025-01-12 16:16:12 +01:00
|
|
|
group=RulespecGroupDatasourceProgramsCustom,
|
2023-12-02 13:49:10 +01:00
|
|
|
name="special_agents:hal9001",
|
|
|
|
valuespec=_params_special_agent_hal9001,
|
|
|
|
)
|
|
|
|
)
|