diff --git a/agent_based/checkpoint_asg_sg_diag.py b/agent_based/checkpoint_asg_sg_diag.py index 4841c08c43307d3dd1510b56d6e54af610721f11..1364616d34e2d741000d99f25171af94fadbc28f 100644 --- a/agent_based/checkpoint_asg_sg_diag.py +++ b/agent_based/checkpoint_asg_sg_diag.py @@ -13,6 +13,7 @@ # 2021-03-03: fixed date/time in parse function # 2021-09-10: fixed duplicate detail output # 2021-09-29: renamed checkpoint_asg_diag to checkpoint_asg_sg_diag +# 2023-05-30: moved gui files to ~/local/lib/chek_mk/gui/plugins/... # # sample snmpwalk for one passed asg test # .1.3.6.1.4.1.2620.1.48.31.1.1.1.21.0 = Wrong Type (should be OCTET STRING): Gauge32: 21 diff --git a/checkpoint_asg_sg_diag-0.4.0-20230530.mkp b/checkpoint_asg_sg_diag-0.4.0-20230530.mkp new file mode 100644 index 0000000000000000000000000000000000000000..91ed23e564ad38ab8eed2bd8c5c0ba2e705a560e Binary files /dev/null and b/checkpoint_asg_sg_diag-0.4.0-20230530.mkp differ diff --git a/checkpoint_asg_sg_diag.mkp b/checkpoint_asg_sg_diag.mkp index 2245e7d583dedee86721145a9fb489f1ffc51a68..91ed23e564ad38ab8eed2bd8c5c0ba2e705a560e 100644 Binary files a/checkpoint_asg_sg_diag.mkp and b/checkpoint_asg_sg_diag.mkp differ diff --git a/gui/wato/checkpoint_asg_sg_diag.py b/gui/wato/checkpoint_asg_sg_diag.py new file mode 100644 index 0000000000000000000000000000000000000000..c0359181b4d5bee0db9b6b0206db0d9ae3a8e7b7 --- /dev/null +++ b/gui/wato/checkpoint_asg_sg_diag.py @@ -0,0 +1,67 @@ +#!/usr/bin/env python3 +# -*- coding: utf-8 -*- +# +# +from cmk.gui.i18n import _ +from cmk.gui.valuespec import ( + Dictionary, + Integer, + ListOfStrings, + Tuple, +) + +from cmk.gui.plugins.wato.utils import ( + CheckParameterRulespecWithItem, + rulespec_registry, + RulespecGroupCheckParametersNetworking, +) + + +def _parameter_valuespec_checkpoint_asg_sg_diag(): + return Dictionary(elements=[ + ('levels_upper_last_run', + Tuple( + title=_('Maximum days no run "asg diag verify"'), + elements=[ + Integer( + title=_('Warning at'), + unit='days', + default_value=3, + minvalue=1, + ), + Integer( + title=_('Critical at'), + unit='days', + default_value=5, + minvalue=1, + ) + ], + )), + ('asg_diag_ignore', + ListOfStrings( + title=_('Index list of ignored failde tests'), + orientation='horizontal', + allow_empty=False, + valuespec=Integer(minvalue=1, maxvalue=99), + help=_('This tests will be ignored if the are not "Passed". The monitoring state will stay OK'), + )), + ('asg_diag_warning', + ListOfStrings( + title=_('Indix list of WARNING only failed tests'), + orientation='horizontal', + allow_empty=False, + valuespec=Integer(minvalue=1, maxvalue=99), + help=_('For this tests the monitoring state will be WARNING if the test result is not "Passed", ' + 'all other failed tests set the monitoring state to CRITICAL.'), + )), + ]) + + +rulespec_registry.register( + CheckParameterRulespecWithItem( + check_group_name='checkpoint_asg_sg_diag', + group=RulespecGroupCheckParametersNetworking, + match_type='dict', + parameter_valuespec=_parameter_valuespec_checkpoint_asg_sg_diag, + title=lambda: _('Check Point ASG Diag'), + )) diff --git a/packages/checkpoint_asg_sg_diag b/packages/checkpoint_asg_sg_diag index a5cf2a5c275e3efd629004eeda582fc8c05bf109..89ff7446f294524965e0428929b1dd850de9bf03 100644 --- a/packages/checkpoint_asg_sg_diag +++ b/packages/checkpoint_asg_sg_diag @@ -3,11 +3,10 @@ '\n', 'download_url': 'http://thl-cmk.hopto.org/', 'files': {'agent_based': ['checkpoint_asg_sg_diag.py'], - 'web': ['plugins/wato/checkpoint_asg_sg_diag.py']}, + 'gui': ['wato/checkpoint_asg_sg_diag.py']}, 'name': 'checkpoint_asg_sg_diag', - 'num_files': 2, 'title': 'Check Point Maestro SG ASG Diag', - 'version': '20210929.v0.3', - '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