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

update project

parent 7371f842
No related branches found
No related tags found
No related merge requests found
......@@ -35,7 +35,6 @@ from cmk.base.plugins.agent_based.agent_based_api.v1 import (
check_levels_predictive,
SNMPTree,
startswith,
contains,
any_of,
)
......@@ -114,4 +113,4 @@ register.check_plugin(
check_function=check_cisco_fw_nat_translations,
check_default_parameters={},
check_ruleset_name='cisco_fw_nat_translations'
)
\ No newline at end of file
)
File added
No preview for this file type
#!/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 : 2023-03-09
#
# Cisco Firewall NAT translations metrics plugin
#
from cmk.gui.i18n import _
from cmk.gui.plugins.metrics.utils import (
metric_info,
graph_info,
check_metrics,
perfometer_info,
)
# for predictive monitoring
check_metrics["check_mk-cisco_fw_nat_translations"] = {
"predict_fw_nat_active": {"auto_graph": False},
}
metric_info['predict_fw_nat_active'] = {
'title': _('_Predicted NAT translations'),
'unit': 'count',
'color': '26/b',
}
#
metric_info['fw_nat_active'] = {
'title': _('Active'),
'unit': 'count',
'color': '26/a',
}
metric_info['fw_nat_peak'] = {
'title': _('Peak'),
'unit': 'count',
'color': '16/a',
}
graph_info['cisco_fw_nat_translations'] = {
'title': _('NAT translatins'),
'metrics': [
('predict_fw_nat_active', 'line'),
('fw_nat_peak', 'line'),
('fw_nat_active', 'area'),
],
'scalars': [
('fw_nat_active:crit'), # , _('CRIT')
('fw_nat_active:warn'), # , _('WARN')
],
'optional_metrics': [
'predict_fw_nat_active',
],
}
perfometer_info.append(
{
'type': 'logarithmic',
'metric': 'fw_nat_active',
'half_value': 100000.0,
'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 : 2023-03-09
#
# Cisco Firewall NAT translations WATO plugin
#
# 2023-03-10: moved rule to Networking
#
#
from cmk.gui.i18n import _
from cmk.gui.valuespec import (
Dictionary,
Integer,
Tuple,
)
from cmk.gui.plugins.wato.utils import (
CheckParameterRulespecWithoutItem,
rulespec_registry,
RulespecGroupCheckParametersNetworking,
Levels,
)
def _parameter_valuespec_cisco_fw_nat_translations():
return Dictionary(elements=[
('levels_upper',
Levels(
title=_('NAT translations'),
unit=_('Translations'),
)),
('levels_lower',
Tuple(
help=_('This rule sets lower levels to the active number of NAT translations through the firewall. '
'Will only be used if NAT translations is not predictive levels.'),
title=_('NAT translations lower levels'),
elements=[
Integer(title=_('Warning if below'), unit='Translations'),
Integer(title=_('Critical if below'), unit='Translations'),
],
)),
],)
rulespec_registry.register(
CheckParameterRulespecWithoutItem(
check_group_name='cisco_fw_nat_translations',
group=RulespecGroupCheckParametersNetworking,
match_type='dict',
parameter_valuespec=_parameter_valuespec_cisco_fw_nat_translations,
title=lambda: _('Firewall NAT translatins'),
))
......@@ -2,11 +2,11 @@
'description': 'Monitor Cisco Firewall NAT translations\n',
'download_url': 'https://thl-cmk.hopto.org',
'files': {'agent_based': ['cisco_fw_nat_translations.py'],
'web': ['plugins/metrics/cisco_fw_nat_translations.py',
'plugins/wato/cisco_fw_nat_translations.py']},
'gui': ['metrics/cisco_fw_nat_translations.py',
'wato/cisco_fw_nat_translations.py']},
'name': 'cisco_fw_nat_translations',
'title': 'Cisco Firewall NAT Translations',
'version': '20230310.v0.0.1a',
'version.min_required': '2.0.0',
'version.packaged': '2.1.0p22',
'version': '0.0.2-20230607',
'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