Collection of CheckMK checks (see https://checkmk.com/). All checks and plugins are provided as is. Absolutely no warranty. Send any comments to thl-cmk[at]outlook[dot]com

Skip to content
Snippets Groups Projects
Commit e7894310 authored by thl-cmk's avatar thl-cmk :flag_na:
Browse files

Delete cisco_cellular_lte.py

parent e8a193d6
No related branches found
No related tags found
No related merge requests found
#!/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,
))
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment