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 25f0990a authored by thl-cmk's avatar thl-cmk :flag_na:
Browse files

update project

parent cfe8be4d
No related branches found
No related tags found
No related merge requests found
......@@ -10,6 +10,7 @@
# Monitor Check Point MHO ports
#
# 2022-10-23: fixed warning on upgrade "non-empty params vanished" for discovery_speed
# 2023-05-29: moved gui files to ~/local/lib/check_mk/gui/plugins/...
#
# sample snmpwalk
#
......
File added
No preview for this file type
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
from cmk.gui.i18n import _
from cmk.gui.plugins.metrics.utils import (
metric_info,
graph_info,
perfometer_info,
)
metric_info['checkpoint_mho_port_rx_ucats'] = {
'title': _('RX Unicasts'),
'unit': '1/s',
'color': '11/a',
}
metric_info['checkpoint_mho_port_tx_ucats'] = {
'title': _('TX Unicasts'),
'unit': '1/s',
'color': '11/b',
}
metric_info['checkpoint_mho_port_rx_mcats'] = {
'title': _('RX Multicasts'),
'unit': '1/s',
'color': '12/a',
}
metric_info['checkpoint_mho_port_tx_mcats'] = {
'title': _('TX Multicasts'),
'unit': '1/s',
'color': '12/b',
}
metric_info['checkpoint_mho_port_rx_bcats'] = {
'title': _('RX Broadcasts'),
'unit': '1/s',
'color': '13/a',
}
metric_info['checkpoint_mho_port_tx_bcats'] = {
'title': _('TX Broadcasts'),
'unit': '1/s',
'color': '13/b',
}
metric_info['checkpoint_mho_port_rx_err'] = {
'title': _('RX Errors'),
'unit': '1/s',
'color': '14/a',
}
metric_info['checkpoint_mho_port_tx_err'] = {
'title': _('TX Errors'),
'unit': '1/s',
'color': '14/b',
}
metric_info['checkpoint_mho_port_rx_frames'] = {
'title': _('RX Frames'),
'unit': '1/s',
'color': '15/a',
}
metric_info['checkpoint_mho_port_tx_frames'] = {
'title': _('TX Frames'),
'unit': '1/s',
'color': '15/b',
}
metric_info['checkpoint_mho_port_rx_bytes'] = {
'title': _('RX bandwidth'),
'unit': 'bits/s',
'color': '16/a',
}
metric_info['checkpoint_mho_port_tx_bytes'] = {
'title': _('TX bandwidth'),
'unit': 'bits/s',
'color': '16/b',
}
metric_info['checkpoint_mho_port_rx_fcs_err'] = {
'title': _('RX FCS Errors'),
'unit': '1/s',
'color': '21/a',
}
metric_info['checkpoint_mho_port_tx_fcs_err'] = {
'title': _('TX FCS Errors'),
'unit': '1/s',
'color': '21/b',
}
graph_info['checkpoint_mho_port_bytes'] = {
'title': _('Check Point MHO port bytes'),
'metrics': [
('checkpoint_mho_port_rx_bytes', 'area'),
('checkpoint_mho_port_tx_bytes', '-area'),
],
}
graph_info['checkpoint_mho_port_frames'] = {
'title': _('Check Point MHO port frames'),
'metrics': [
('checkpoint_mho_port_rx_frames', 'line'),
('checkpoint_mho_port_rx_ucats', 'stack'),
('checkpoint_mho_port_rx_mcats', 'stack'),
('checkpoint_mho_port_rx_bcats', 'stack'),
('checkpoint_mho_port_tx_frames', '-line'),
('checkpoint_mho_port_tx_ucats', '-stack'),
('checkpoint_mho_port_tx_mcats', '-stack'),
('checkpoint_mho_port_tx_bcats', '-stack'),
],
}
graph_info['checkpoint_mho_port_errors'] = {
'title': _('Check Point MHO port errors'),
'metrics': [
('checkpoint_mho_port_rx_err', 'line'),
('checkpoint_mho_port_rx_fcs_err', 'line'),
('checkpoint_mho_port_tx_err', '-line'),
('checkpoint_mho_port_tx_fcs_err', '-line'),
],
}
perfometer_info.append(('stacked', [
{
'type': 'logarithmic',
'metric': 'checkpoint_mho_port_rx_bytes',
'half_value': 100.0 * 48,
'exponent': 2,
},
{
'type': 'logarithmic',
'metric': 'checkpoint_mho_port_tx_bytes',
'half_value': 100.0 * 48,
'exponent': 2,
},
]))
#!/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 : 2021-12-02
#
from cmk.gui.i18n import _
from cmk.gui.valuespec import (
Dictionary,
TextAscii,
MonitoringState,
FixedValue,
TextUnicode,
)
from cmk.gui.plugins.wato.utils import (
CheckParameterRulespecWithItem,
rulespec_registry,
RulespecGroupCheckParametersNetworking,
RulespecGroupCheckParametersDiscovery,
HostRulespec,
)
def _parameter_valuespec_checkpoint_mho_ports():
return Dictionary(
elements=[
('state_admin_down',
MonitoringState(
title=_('State if port is Admin down'),
help=_('Monitoring state if port is Admin down'),
default_value=1,
)),
('state_link_down',
MonitoringState(
title=_('State if port Link state is down'),
help=_('Monitoring state if port link state is down'),
default_value=2,
)),
('state_speed_changed',
MonitoringState(
title=_('State if port speed has changed'),
help=_('Monitoring state if port speed has changed from discovery'),
default_value=1,
)),
('discovery_speed', TextUnicode()), # added by plugin discovery function
],
hidden_keys=['discovery_speed']
)
rulespec_registry.register(
CheckParameterRulespecWithItem(
check_group_name='checkpoint_mho_ports',
group=RulespecGroupCheckParametersNetworking,
match_type='dict',
parameter_valuespec=_parameter_valuespec_checkpoint_mho_ports,
title=lambda: _('Check Point MHO port'),
item_spec=lambda: TextAscii(title=_('Port index'), ),
))
def _valuespec_discovery_checkpoint_mho_ports():
return Dictionary(
title=_('Check Point MHO ports'),
elements=[
('add_admin_down',
FixedValue(
False,
title=_('Do not add Admin down ports'),
totext=_('If enabled the plugin will not add ports in Admin down state'),
)),
('add_link_down',
FixedValue(
False,
title=_('Do not add Link down ports'),
totext=_('If enabled the plugin will not add ports in Link down state'),
)),
],
)
rulespec_registry.register(
HostRulespec(
group=RulespecGroupCheckParametersDiscovery,
match_type='dict',
name='discovery_checkpoint_mho_ports',
valuespec=_valuespec_discovery_checkpoint_mho_ports,
))
......@@ -4,12 +4,11 @@
'Tested on Orchestrator MHO-140 with R8020.SP HFA_317\n',
'download_url': 'https://thl-cmk.hopto.org',
'files': {'agent_based': ['checkpoint_mho_ports.py'],
'web': ['plugins/metrics/checkpoint_mho_ports.py',
'plugins/wato/checkpoint_mho_ports.py']},
'gui': ['metrics/checkpoint_mho_ports.py',
'wato/checkpoint_mho_ports.py']},
'name': 'checkpoint_mho_ports',
'num_files': 3,
'title': 'Check Point MHO Ports',
'version': '20221023.v0.0.1a',
'version.min_required': '2.0.0',
'version.packaged': '2021.09.20',
'version': '0.0.2-20230422',
'version.min_required': '2.1.0b1',
'version.packaged': '2.1.0p21',
'version.usable_until': None}
\ No newline at end of file
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