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

update project

parent dae86a8c
No related branches found
No related tags found
No related merge requests found
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,
)
_i = 0
while _i < 8:
metric_info[f'checkpoint_mho_port_buffer_{_i}_frames'] = {
'title': _(f'RX buffer {_i} frames'),
'unit': '1/s',
'color': f'1{_i // 2 + 1}/{chr(97 + _i % 2)}',
}
metric_info[f'checkpoint_mho_port_buffer_{_i}_octets'] = {
'title': _(f'RX buffer {_i} octets'),
'unit': '1/s',
'color': f'2{_i // 2 + 1}/{chr(97 + _i % 2)}',
}
metric_info[f'checkpoint_mho_port_buffer_{_i}_discards'] = {
'title': _(f'RX buffer {_i} discards'),
'unit': '1/s',
'color': f'3{_i // 2 + 1}/{chr(97 + _i % 2)}',
}
_i += 1
metric_info['checkpoint_mho_port_buffer_sum_frames'] = {
'title': _('RX buffer frames summary'),
'unit': '1/s',
'color': '15/a',
}
metric_info['checkpoint_mho_port_buffer_sum_octets'] = {
'title': _('RX buffer octets summary'),
'unit': '1/s',
'color': '25/a',
}
metric_info['checkpoint_mho_port_buffer_sum_discards'] = {
'title': _('RX buffer discards summary'),
'unit': '1/s',
'color': f'35/a',
}
graph_info['checkpoint_mho_port_buffer_frames'] = {
'title': _('Check Point MHO RX buffer frames'),
'metrics': [
('checkpoint_mho_port_buffer_sum_frames', 'line'),
('checkpoint_mho_port_buffer_0_frames', 'line'),
('checkpoint_mho_port_buffer_1_frames', 'line'),
('checkpoint_mho_port_buffer_2_frames', 'line'),
('checkpoint_mho_port_buffer_3_frames', 'line'),
('checkpoint_mho_port_buffer_4_frames', 'line'),
('checkpoint_mho_port_buffer_5_frames', 'line'),
('checkpoint_mho_port_buffer_6_frames', 'line'),
('checkpoint_mho_port_buffer_7_frames', 'line'),
],
}
graph_info['checkpoint_mho_port_buffer_octets'] = {
'title': _('Check Point MHO RX buffer octets'),
'metrics': [
('checkpoint_mho_port_buffer_sum_octets', 'line'),
('checkpoint_mho_port_buffer_0_octets', 'line'),
('checkpoint_mho_port_buffer_1_octets', 'line'),
('checkpoint_mho_port_buffer_2_octets', 'line'),
('checkpoint_mho_port_buffer_3_octets', 'line'),
('checkpoint_mho_port_buffer_4_octets', 'line'),
('checkpoint_mho_port_buffer_5_octets', 'line'),
('checkpoint_mho_port_buffer_6_octets', 'line'),
('checkpoint_mho_port_buffer_7_octets', 'line'),
],
}
graph_info['checkpoint_mho_port_buffer_discards'] = {
'title': _('Check Point MHO RX buffer discards'),
'metrics': [
('checkpoint_mho_port_buffer_sum_discards', 'line'),
('checkpoint_mho_port_buffer_0_discards', 'line'),
('checkpoint_mho_port_buffer_1_discards', 'line'),
('checkpoint_mho_port_buffer_2_discards', 'line'),
('checkpoint_mho_port_buffer_3_discards', 'line'),
('checkpoint_mho_port_buffer_4_discards', 'line'),
('checkpoint_mho_port_buffer_5_discards', 'line'),
('checkpoint_mho_port_buffer_6_discards', 'line'),
('checkpoint_mho_port_buffer_7_discards', 'line'),
],
}
#!/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,
FixedValue,
)
from cmk.gui.plugins.wato.utils import (
rulespec_registry,
RulespecGroupCheckParametersDiscovery,
HostRulespec,
)
def _valuespec_discovery_checkpoint_mho_buffers():
return Dictionary(
title=_('Check Point MHO buffers'),
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_buffers',
valuespec=_valuespec_discovery_checkpoint_mho_buffers,
))
......@@ -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_buffers.py'],
'web': ['plugins/metrics/checkpoint_mho_buffers.py',
'plugins/wato/checkpoint_mho_buffers.py']},
'gui': ['metrics/checkpoint_mho_buffers.py',
'wato/checkpoint_mho_buffers.py']},
'name': 'checkpoint_mho_buffers',
'num_files': 3,
'title': 'Check Point MHO port RX buffers',
'version': '20211130.v0.0.1',
'version.min_required': '2.0.0',
'version.packaged': '2021.09.20',
'version': '0.0.2-20230529',
'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