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

update project

parent 5149f379
No related branches found
No related tags found
No related merge requests found
No preview for this file type
...@@ -52,14 +52,6 @@ def check_checkpoint_fw_connections(item, params, info): ...@@ -52,14 +52,6 @@ def check_checkpoint_fw_connections(item, params, info):
if fwConnTableLimit == 0: if fwConnTableLimit == 0:
fwConnTableLimit = 'automatically adjusted' fwConnTableLimit = 'automatically adjusted'
perfdata = [('fwconnectionstcp', fwConnectionsTcp),
('fwconnectionsudp', fwConnectionsUdp),
('fwconnectionsicmp', fwConnectionsIcmp),
('fwconnectionsother', fwConnectionsOther),
('fwconnectionssum', fwConnectionsSum),
('fwpeaknumconn', fwPeakNumConn)
]
for info, unit, counter, value, warncrit in [ for info, unit, counter, value, warncrit in [
('current: ', '', 'fwcurrentnumconn', fwCurrnetNumConn, 'warncritcurrent'), ('current: ', '', 'fwcurrentnumconn', fwCurrnetNumConn, 'warncritcurrent'),
('rate: ', '/s', 'fwconnectionrate', fwConnectionRate, 'warncritrate') ('rate: ', '/s', 'fwconnectionrate', fwConnectionRate, 'warncritrate')
...@@ -69,15 +61,25 @@ def check_checkpoint_fw_connections(item, params, info): ...@@ -69,15 +61,25 @@ def check_checkpoint_fw_connections(item, params, info):
else: else:
warn = None warn = None
crit = None crit = None
perfdata.append((counter, value, warn, crit)) infotext = info + '%d' % value + unit
perfdata = [(counter, value, warn, crit)]
if crit != None and value >= crit: if crit != None and value >= crit:
yield 2, info + '%d' % value + unit + ' (>=%d)' % crit yield 2, infotext + ' (>=%d)' % crit, perfdata
elif warn != None and value >= warn: elif warn != None and value >= warn:
yield 1, info + '%d' % value + unit + ' (>=%d)' % warn yield 1, infotext + ' (>=%d)' % warn, perfdata
else: else:
yield 0, info + '%d' % value + unit yield 0, infotext, perfdata
infotext = 'peak: %d, table limit: %s' % (fwPeakNumConn, fwConnTableLimit) infotext = 'peak: %d, table limit: %s' % (fwPeakNumConn, fwConnTableLimit)
perfdata = [('fwconnectionstcp', fwConnectionsTcp),
('fwconnectionsudp', fwConnectionsUdp),
('fwconnectionsicmp', fwConnectionsIcmp),
('fwconnectionsother', fwConnectionsOther),
('fwconnectionssum', fwConnectionsSum),
('fwpeaknumconn', fwPeakNumConn)
]
yield 0, infotext , perfdata yield 0, infotext , perfdata
......
...@@ -31,17 +31,17 @@ metric_info['checkpoint_fw_connections_fwconnectionstcp'] = { ...@@ -31,17 +31,17 @@ metric_info['checkpoint_fw_connections_fwconnectionstcp'] = {
metric_info['checkpoint_fw_connections_fwconnectionsudp'] = { metric_info['checkpoint_fw_connections_fwconnectionsudp'] = {
'title': _('UDP connections'), 'title': _('UDP connections'),
'unit': '1/s', 'unit': '1/s',
'color': '14/a', 'color': '12/a',
} }
metric_info['checkpoint_fw_connections_fwconnectionsicmp'] = { metric_info['checkpoint_fw_connections_fwconnectionsicmp'] = {
'title': _('ICMP connections'), 'title': _('ICMP connections'),
'unit': '1/s', 'unit': '1/s',
'color': '31/a', 'color': '13/a',
} }
metric_info['checkpoint_fw_connections_fwconnectionsother'] = { metric_info['checkpoint_fw_connections_fwconnectionsother'] = {
'title': _('Other connections'), 'title': _('Other connections'),
'unit': '1/s', 'unit': '1/s',
'color': '34/a', 'color': '14/a',
} }
metric_info['checkpoint_fw_connections_fwconnectionssum'] = { metric_info['checkpoint_fw_connections_fwconnectionssum'] = {
'title': _('Total connections'), 'title': _('Total connections'),
...@@ -62,7 +62,7 @@ metric_info['checkpoint_fw_connections_fwcurrentnumconn'] = { ...@@ -62,7 +62,7 @@ metric_info['checkpoint_fw_connections_fwcurrentnumconn'] = {
metric_info['checkpoint_fw_connections_fwpeaknumconn'] = { metric_info['checkpoint_fw_connections_fwpeaknumconn'] = {
'title': _('Peak Connections'), 'title': _('Peak Connections'),
'unit': 'count', 'unit': 'count',
'color': '13/a', 'color': '15/a',
} }
......
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