From e7894310a93980014f397add4ca067416f0b0469 Mon Sep 17 00:00:00 2001 From: thl-cmk <thl-cmk@outlook.com> Date: Mon, 20 Feb 2023 18:49:47 +0000 Subject: [PATCH] Delete cisco_cellular_lte.py --- web/plugins/wato/cisco_cellular_lte.py | 171 ------------------------- 1 file changed, 171 deletions(-) delete mode 100644 web/plugins/wato/cisco_cellular_lte.py diff --git a/web/plugins/wato/cisco_cellular_lte.py b/web/plugins/wato/cisco_cellular_lte.py deleted file mode 100644 index febe951..0000000 --- a/web/plugins/wato/cisco_cellular_lte.py +++ /dev/null @@ -1,171 +0,0 @@ -#!/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 : 2022-09-20 -# File : wato/cisco_cellular_lte.py -# - -from cmk.gui.i18n import _ -from cmk.gui.valuespec import ( - Dictionary, - TextAscii, - MonitoringState, - FixedValue, - Integer, - Tuple, - DropdownChoice, -) - -from cmk.gui.plugins.wato import ( - CheckParameterRulespecWithItem, - rulespec_registry, - RulespecGroupCheckParametersNetworking, - RulespecGroupCheckParametersDiscovery, - HostRulespec, -) - - -def _parameter_valuespec_cisco_cellular_lte(): - return Dictionary( - elements=[ - ('rsrp_levels_lower', - Tuple( - title=_('Lower levels for RSRP'), - help=_('Lower levels for RSRP (Reference Signal Received Power) in dBm'), - elements=[ - Integer(title=_('Warning below'), default_value=-103, unit=_('dBm')), - Integer(title=_('Critical below'), default_value=-112, unit=_('dBm')), - ])), - ('rsrq_levels_lower', - Tuple( - title=_('Lower levels for RSRQ'), - help=_('Lower levels for RSRQ (Reference Signal Received Quality) in dB'), - elements=[ - Integer(title=_('Warning below'), default_value=-9, unit=_('dB')), - Integer(title=_('Critical below'), default_value=-13, unit=_('dB')), - ])), - ('rssi_levels_lower', - Tuple( - title=_('Lower levels for RSSI'), - help=_('Lower levels for RSSI (Received Signal Strength Indicator) in dBm'), - elements=[ - Integer(title=_('Warning below'), default_value=-75, unit=_('dBm')), - Integer(title=_('Critical below'), default_value=-85, unit=_('dBm')), - ])), - ('expected_band', - DropdownChoice( - title=_('Expected Band'), - help=_('The expected cellular band.'), - default_value='12', - choices=[ - ('12', 'LTE'), - ('0', 'UMTS'), - ('11', 'WCDMA-2100'), - ('10', 'WCDMA-1900'), - ('9', 'WCDMA-850'), - ('8', 'WCDMA-800'), - ('7', 'GSM-1900'), - ('6', 'GSM-1800'), - ('5', 'GSM-900'), - ('4', 'GSM-850'), - ('3', 'none'), - ('2', 'invalid'), - ('1', 'unknown'), - ] - )), - ('state_not_expected_band', - MonitoringState( - title=_('Monitoring state if current band is not expected band '), - help=_('Monitoring state if the current band is not the expected band. Default is WARN.'), - default_value=1, - )), - ('band_as_metric', - FixedValue( - True, - title=_('Show the current band as graph'), - help=_( - 'This will output the current band as performance data. Then you get a graph where you can ' - 'follow the band changes of the monitored device. Scalars are used to create a kind of ' - 'legend for this graph' - ), - totext=_('') - )), - ('roaming_state', - MonitoringState( - title=_('Monitoring state if the device is roaming'), - help=_('Monitoring state if the device is roaming. Default is WARN.'), - default_value=1, - )), - ('no_profile_state', - MonitoringState( - title=_('Monitoring state if no SIM card associated'), - help=_('Monitoring state if no SIM card associated with the interface. Default is WARN.'), - default_value=1, - )), - ('connection_state', - MonitoringState( - title=_('Monitoring state if the device is not connected'), - help=_('Monitoring state if the device is not connected. Default is CRIT.'), - default_value=1, - )), - ('modem_not_up_state', - MonitoringState( - title=_('Monitoring state if the modem is not up'), - help=_('Monitoring state if the the modem is not up. Default is CRIT.'), - default_value=1, - )), - ('modem_not_online_state', - MonitoringState( - title=_('Monitoring state if the modem is not online'), - help=_('Monitoring state if the the modem is not online. Default is CRIT.'), - default_value=1, - )), - ('CSCvt55347_fixed', - FixedValue( - True, - title=_('The device is not affected by Cisco Bug ID CSCvt55347.'), - help=_('In the Cisco OS is a Bug that gives the wrong value for RSRQ. Enable this option if ' - 'your device is not affected by this bug..'), - totext=_('') - )), - ], - ) - - -rulespec_registry.register( - CheckParameterRulespecWithItem( - check_group_name='cisco_cellular_lte', - group=RulespecGroupCheckParametersNetworking, - match_type='dict', - parameter_valuespec=_parameter_valuespec_cisco_cellular_lte, - title=lambda: _('Cisco cellular LTE'), - item_spec=lambda: TextAscii(title=_('Interface name'), ), - )) - - -def _valuespec_discovery_cisco_cellular_lte(): - return Dictionary( - title=_('Cisco cellular LTE'), - elements=[ - ('only_configured', - FixedValue( - False, - title=_('Discover interfaces without associated SIM card'), - help=_('If enabled the plugin will discover cellular interfaces without a associated SIM card.'), - totext=_('') - )), - ], - ) - - -rulespec_registry.register( - HostRulespec( - group=RulespecGroupCheckParametersDiscovery, - match_type='dict', - name='discovery_cisco_cellular_lte', - valuespec=_valuespec_discovery_cisco_cellular_lte, - )) -- GitLab