diff --git a/README.md b/README.md index 8325e97..5a89823 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,12 @@ # HAL9001-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. -Covers various aspects of agent development within CheckMK. \ No newline at end of file +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. +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) \ No newline at end of file diff --git a/images/service-detail-overall-info.png b/images/service-detail-overall-info.png new file mode 100644 index 0000000..f0e3db3 Binary files /dev/null and b/images/service-detail-overall-info.png differ diff --git a/images/service-detail-storage.png b/images/service-detail-storage.png new file mode 100644 index 0000000..3d165db Binary files /dev/null and b/images/service-detail-storage.png differ diff --git a/images/service-detail-user.png b/images/service-detail-user.png new file mode 100644 index 0000000..243ca17 Binary files /dev/null and b/images/service-detail-user.png differ diff --git a/images/services-overview.png b/images/services-overview.png new file mode 100644 index 0000000..23fbba5 Binary files /dev/null and b/images/services-overview.png differ diff --git a/local/share/check_mk/agents/special/agent_hal9001 b/local/share/check_mk/agents/special/agent_hal9001 index 19f6672..506ce39 100644 --- a/local/share/check_mk/agents/special/agent_hal9001 +++ b/local/share/check_mk/agents/special/agent_hal9001 @@ -56,7 +56,7 @@ opt_password = "" base_usage = float(65536 * 8) # 0.5 MByte 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 users_dict = { "user1": { diff --git a/local/share/check_mk/web/plugins/wato/hal9001_params.py b/local/share/check_mk/web/plugins/wato/hal9001_params.py index 31664d5..08ab751 100644 --- a/local/share/check_mk/web/plugins/wato/hal9001_params.py +++ b/local/share/check_mk/web/plugins/wato/hal9001_params.py @@ -6,37 +6,58 @@ from cmk.gui.plugins.wato import ( ) from cmk.gui.valuespec import ( - Dictionary, - ListChoice, + Age, + Alternative, + CascadingDropdown, Checkbox, - TextAscii, + Dictionary, + DictionaryElements, + DropdownChoice, + FixedValue, + Float, + HostAddress, + Hostname, + HTTPUrl, + ID, + Integer, + ListChoice, + ListOf, + ListOfStrings, + MonitoringState, + NetworkPort, Password, + RegExp, + TextAscii, + TextInput, + Transform, + Tuple, ) from cmk.gui.plugins.wato import ( HostRulespec, + IndividualOrStoredPassword, ) from cmk.gui.plugins.wato.datasource_programs import RulespecGroupDatasourceProgramsCustom -#import cmk.gui.watolib as watolib def _params_special_agent_hal9001(): return Dictionary( title=_("Login parameters for HAL9001 systems"), help = _("HAL9001: Dedicated to Arthur C. Clarke"), elements=[ - ("username", TextAscii(title=_("Username"), + ("username", TextAscii( + title=_("Username"), allow_empty=False, help=_("Username with administrative rights, mandatory"))), - ("password", Password(title=_("Password"), + ("password", Password( + title=_("Password"), allow_empty=False, - help=_("Specify password of this user"))), + help=_("Specify password of this user, mandatory"))), ], optional_keys=[], ) rulespec_registry.register( HostRulespec( - #factory_default=watolib.Rulespec.FACTORY_DEFAULT_UNUSED, group=RulespecGroupDatasourceProgramsCustom, name="special_agents:hal9001", valuespec=_params_special_agent_hal9001,