diff --git a/agent_based/checkpoint_asg_chassis.py b/agent_based/checkpoint_asg_chassis.py index 1dc51786bf51c709e337e5ae4e216a2c58f22f1b..c979a08e5549c747d60ad361e09e57899987ad2b 100644 --- a/agent_based/checkpoint_asg_chassis.py +++ b/agent_based/checkpoint_asg_chassis.py @@ -14,7 +14,9 @@ # 2021-09-10: rewrite parse function # 2021-09-11: added WATO, cleanup # 2022-10-23: fixed warning on upgrade "non-empty params vanished" for discovery_chassis and discovery_sgms +# 2023-05-29: moved gui files to ~/local/lib/check_mk/gui/plugins/... # + # sample snmpwalk # .1.3.6.1.4.1.2620.1.48.28.1.0 = STRING: "Multi" # .1.3.6.1.4.1.2620.1.48.28.2.0 = STRING: "Primary Up" diff --git a/checkpoint_asg_chassis-0.4.0-20230530.mkp b/checkpoint_asg_chassis-0.4.0-20230530.mkp new file mode 100644 index 0000000000000000000000000000000000000000..d6a7f7c07227f2735ecaf930815fbb6bac3dbcd3 Binary files /dev/null and b/checkpoint_asg_chassis-0.4.0-20230530.mkp differ diff --git a/checkpoint_asg_chassis.mkp b/checkpoint_asg_chassis.mkp index 7c2a3a561465559a2dd73c1984e87eaf2814e6b8..d6a7f7c07227f2735ecaf930815fbb6bac3dbcd3 100644 Binary files a/checkpoint_asg_chassis.mkp and b/checkpoint_asg_chassis.mkp differ diff --git a/gui/wato/checkpoint_asg_chassis.py b/gui/wato/checkpoint_asg_chassis.py new file mode 100644 index 0000000000000000000000000000000000000000..9cca766edcd93c7458a3ca50e91377c7ff08c24f --- /dev/null +++ b/gui/wato/checkpoint_asg_chassis.py @@ -0,0 +1,84 @@ +#!/usr/bin/env python3 +# -*- coding: utf-8 -*- +# +# +from cmk.gui.i18n import _ +from cmk.gui.valuespec import ( + Dictionary, + DropdownChoice, + MonitoringState, + Integer, +) + +from cmk.gui.plugins.wato.utils import ( + CheckParameterRulespecWithoutItem, + rulespec_registry, + RulespecGroupCheckParametersNetworking, +) + + +def _parameter_valuespec_checkpoint_asg_chassis(): + return Dictionary( + elements=[ + ('desired_chassis_active', + DropdownChoice( + title=_('Desired active chassis'), + help=_('Select witch chassis should be active'), + sorted=True, + default_value='1', + choices=[ + ('1', _('Chassis ID 1')), + ('2', _('Chassis ID 2')), + ], + )), + ('state_chassis_not_desired_active', + MonitoringState( + default_value=1, + title=_('State if desired chassis not active'), + help=_('Monitoring state if the desired chassis not active'), + )), + ('state_chassis_number_changed', + MonitoringState( + default_value=2, + title=_('State if number of chassis has changed'), + help=_('Monitoring state if number of chassis differs from discovery time'), + )), + ('state_chassis_not_active_standby', + MonitoringState( + default_value=2, + title=_('State if chassis not active/standby'), + help=_('Monitoring state if the chassis not active or standby'), + )), + ('state_chassis_not_max_grade', + MonitoringState( + default_value=2, + title=_('State if chassis is not optimal'), + help=_('Monitoring state if the chassis grade is less than max grade'), + )), + ('state_sgm_not_active', + MonitoringState( + default_value=2, + title=_('State if SGM is not active'), + help=_('Monitoring state if the SGM state is not active'), + )), + ('state_sgms_number_changed', + MonitoringState( + default_value=2, + title=_('State if number of SGMs has canged'), + help=_('Monitoring state if number of SGMs differs from discovery time'), + )), + ('discovery_chassis', Integer()), # added by plugin discovery function + ('discovery_sgms', Integer()), # added by plugin discovery function + ], + hidden_keys=['discovery_chassis', 'discovery_sgms'], + ) + + +rulespec_registry.register( + CheckParameterRulespecWithoutItem( + check_group_name='checkpoint_asg_chassis', + group=RulespecGroupCheckParametersNetworking, + match_type='dict', + parameter_valuespec=_parameter_valuespec_checkpoint_asg_chassis, + title=lambda: _('Check Point ASG Monitor'), + )) diff --git a/packages/checkpoint_asg_chassis b/packages/checkpoint_asg_chassis index d87852d70191d2085ac732dc8b53d09fcd988fae..b54ce4608d24e0e94214d5cadcf1d2b7890ae1b5 100644 --- a/packages/checkpoint_asg_chassis +++ b/packages/checkpoint_asg_chassis @@ -4,11 +4,10 @@ 'download_url': 'http://thl-cmk.hopto.org/', 'files': {'agent_based': ['checkpoint_asg_chassis.py'], 'checkman': ['checkpoint_asg_chassis'], - 'web': ['plugins/wato/checkpoint_asg_chassis.py']}, + 'gui': ['wato/checkpoint_asg_chassis.py']}, 'name': 'checkpoint_asg_chassis', - 'num_files': 3, 'title': 'Check Point Maestro SMO ASG Chassis', - 'version': '20221130.v0.3b', - 'version.min_required': '2.0.0', - 'version.packaged': '2021.09.20', + 'version': '0.4.0-20230530', + 'version.min_required': '2.1.0b1', + 'version.packaged': '2.1.0p21', 'version.usable_until': None} \ No newline at end of file