some images added

This commit is contained in:
Ralf Mellis 2023-12-02 15:20:26 +01:00
parent 411db4711b
commit 309d970342
7 changed files with 40 additions and 12 deletions

View File

@ -1,5 +1,12 @@
# HAL9001-CheckMK # HAL9001-CheckMK
Just an example for a special agent in CheckMK. Just an example for a special agent in CheckMK.
Provides an agent which is highly customizable and does not depend on any remote data source or system. Provides an agent which is highly customizable and does not depend on any remote data source or system.
Covers various aspects of agent development within CheckMK. Covers various aspects of agent development within CheckMK.
Some screenshots:
![Services Overview](images/services-overview.png)
![Services Detail "Overall Info"](images/service-detail-overall-info.png)
![Service Detail "Storage"](images/service-detail-storage.png)
![Service Detail "User"](images/service-detail-user.png)

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

View File

@ -56,7 +56,7 @@ opt_password = ""
base_usage = float(65536 * 8) # 0.5 MByte base_usage = float(65536 * 8) # 0.5 MByte
max_quota = 1073741824.0 # 1 GByte max_quota = 1073741824.0 # 1 GByte
# these dicts are used as starting points, fell free to extend and/or adjust them # these dicts are used as starting points, feel free to extend and/or adjust them
# each user/storage results in an additional service # each user/storage results in an additional service
users_dict = { users_dict = {
"user1": { "user1": {

View File

@ -6,37 +6,58 @@ from cmk.gui.plugins.wato import (
) )
from cmk.gui.valuespec import ( from cmk.gui.valuespec import (
Dictionary, Age,
ListChoice, Alternative,
CascadingDropdown,
Checkbox, Checkbox,
TextAscii, Dictionary,
DictionaryElements,
DropdownChoice,
FixedValue,
Float,
HostAddress,
Hostname,
HTTPUrl,
ID,
Integer,
ListChoice,
ListOf,
ListOfStrings,
MonitoringState,
NetworkPort,
Password, Password,
RegExp,
TextAscii,
TextInput,
Transform,
Tuple,
) )
from cmk.gui.plugins.wato import ( from cmk.gui.plugins.wato import (
HostRulespec, HostRulespec,
IndividualOrStoredPassword,
) )
from cmk.gui.plugins.wato.datasource_programs import RulespecGroupDatasourceProgramsCustom from cmk.gui.plugins.wato.datasource_programs import RulespecGroupDatasourceProgramsCustom
#import cmk.gui.watolib as watolib
def _params_special_agent_hal9001(): def _params_special_agent_hal9001():
return Dictionary( return Dictionary(
title=_("Login parameters for HAL9001 systems"), title=_("Login parameters for HAL9001 systems"),
help = _("HAL9001: Dedicated to Arthur C. Clarke"), help = _("HAL9001: Dedicated to Arthur C. Clarke"),
elements=[ elements=[
("username", TextAscii(title=_("Username"), ("username", TextAscii(
title=_("Username"),
allow_empty=False, allow_empty=False,
help=_("Username with administrative rights, mandatory"))), help=_("Username with administrative rights, mandatory"))),
("password", Password(title=_("Password"), ("password", Password(
title=_("Password"),
allow_empty=False, allow_empty=False,
help=_("Specify password of this user"))), help=_("Specify password of this user, mandatory"))),
], ],
optional_keys=[], optional_keys=[],
) )
rulespec_registry.register( rulespec_registry.register(
HostRulespec( HostRulespec(
#factory_default=watolib.Rulespec.FACTORY_DEFAULT_UNUSED,
group=RulespecGroupDatasourceProgramsCustom, group=RulespecGroupDatasourceProgramsCustom,
name="special_agents:hal9001", name="special_agents:hal9001",
valuespec=_params_special_agent_hal9001, valuespec=_params_special_agent_hal9001,