diff --git a/cisco_wlc_temp-0.2.1-20230607.mkp b/cisco_wlc_temp-0.2.1-20230607.mkp new file mode 100644 index 0000000000000000000000000000000000000000..608e6b30c8f513ef30fa660211261214b08ad998 Binary files /dev/null and b/cisco_wlc_temp-0.2.1-20230607.mkp differ diff --git a/cisco_wlc_temp.mkp b/cisco_wlc_temp.mkp index 840bec5e4e291e5abb58f3e0b245fb6b55061cfc..608e6b30c8f513ef30fa660211261214b08ad998 100644 Binary files a/cisco_wlc_temp.mkp and b/cisco_wlc_temp.mkp differ diff --git a/gui/wato/cisco_wlc_temp.py b/gui/wato/cisco_wlc_temp.py new file mode 100644 index 0000000000000000000000000000000000000000..4ba01d2613f9440193f7fcb9d83a6295b10f152e --- /dev/null +++ b/gui/wato/cisco_wlc_temp.py @@ -0,0 +1,64 @@ +#!/usr/bin/env python3 +# -*- coding: utf-8 -*- +# +# License: GNU General Public License v2 +# +# Author: thl-cmk[at]outlook[dot]com +# URL : https://thl-cmk.hopto.org +# Date : 2016-03-31 +# +# WATO for plugin cisco_wlc_temp +# +# 2023-06-07: moved gui files to ~/local/lib/chek_mk/gui/plugins/... + +from cmk.gui.i18n import _ +from cmk.gui.valuespec import ( + Dictionary, + Tuple, + Integer, +) + +from cmk.gui.plugins.wato.utils import ( + CheckParameterRulespecWithItem, + rulespec_registry, + RulespecGroupCheckParametersNetworking, +) + + +def _parameter_valuespec_cisco_wlc_temp(): + return Dictionary(elements=[ + ('levels_upper', + Tuple( + title=_('Temperature upper levels'), + help=_('Set the upper levels for temperature in °C. From the MID description: ' + 'Operating Environment of the Airespace Switch. commercial is Commercial (0 to 40 C) ' + 'and industrial is Industrial (-10 to 70 C)'), + elements=[ + Integer(title=_('Warning at'), unit=u'°C', default_value=36, minvalue=-20, maxvalue=100), + Integer(title=_('Critical at'), unit=u'°C', default_value=38, minvalue=-20, maxvalue=100) + ], + ), + ), + ('levels_lower', + Tuple( + title=_('Temperature lower levels'), + help=_('Set the lower levels for temperature in °C From the MID description: ' + 'Operating Environment of the Airespace Switch. commercial is Commercial (0 to 40 C) ' + 'and industrial is Industrial (-10 to 70 C)'), + elements=[ + Integer(title=_('Warning below'), unit=u'°C', default_value=12, minvalue=-20, maxvalue=100), + Integer(title=_('Critical below'), unit=u'°C', default_value=10, minvalue=-20, maxvalue=100) + ], + ), + ), + ]) + + +rulespec_registry.register( + CheckParameterRulespecWithItem( + check_group_name='cisco_wlc_temp', + group=RulespecGroupCheckParametersNetworking, + match_type='dict', + parameter_valuespec=_parameter_valuespec_cisco_wlc_temp, + title=lambda: _('Cisco WLC Temperature'), + )) diff --git a/packages/cisco_wlc_temp b/packages/cisco_wlc_temp index b864ecba95c6e2eb235d10abdde72a99341273fe..840ab64fa44fb2743a3882da3742a1f7d8fd876b 100644 --- a/packages/cisco_wlc_temp +++ b/packages/cisco_wlc_temp @@ -5,11 +5,10 @@ 'download_url': 'https://thl-cmk.hopto.org', 'files': {'agent_based': ['cisco_wlc_temp.py'], 'checkman': ['cisco_wlc_temp'], - 'web': ['plugins/wato/cisco_wlc_temp.py']}, + 'gui': ['wato/cisco_wlc_temp.py']}, 'name': 'cisco_wlc_temp', - 'num_files': 3, 'title': 'monitor Cisco WLC temperature sensor', - 'version': '20210715.v.0.2', - 'version.min_required': '2.0.0', - 'version.packaged': '2021.07.14', + 'version': '0.2.1-20230607', + 'version.min_required': '2.1.0b1', + 'version.packaged': '2.1.0p21', 'version.usable_until': None} \ No newline at end of file