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

update project

parent a865256d
Branches
No related tags found
No related merge requests found
......@@ -5,6 +5,7 @@
#
# Author: thl-cmk[at]outlook[dot]com
# URL : https://thl-cmk.hopto.org
# Date : 2016-07-29
#
# 2016-07-19: monitor Check Point FW Log server status
# 2016-07-24: changed for check state
......@@ -13,6 +14,7 @@
# 2018-03-15: code cleanup
# 2020-06-08: changed snmp-scan function
# 2021-06-14: rewrite for cmk 2.0, added wato
# 2021-08-09: fixed empty string_table, fixed log server default state
#
# sample snmpwalk
#
......@@ -101,6 +103,7 @@ class CheckPointFwLs(NamedTuple):
def parse_checkpoint_fw_ls(string_table: List[StringTable]) -> Dict:
if string_table != [[], []]:
over_all, log_servers = string_table
fwlsconnoverall, fwlsconnoveralldesc, fwlocalloggingdesc, fwlocalloggingstat, fwLocalLoggingWriteRate, fwLoggingHandlingRate = \
......@@ -175,12 +178,13 @@ def check_checkpoint_fw_ls(item, params, section: Dict) -> CheckResult:
else:
yield Result(state=State.OK, summary=f'State: {log_server.fwLSConnStateDesc}')
exp_connection_state = params.get('exp_connection_status', 0)
exp_connection_state = params.get('exp_connection_status', 'Log-Server Connected')
mon_connection_state = params.get('mon_connection_state', 1)
print(type(log_server.fwLSConnStateDesc))
print(exp_connection_state)
if log_server.fwLSConnStateDesc.lower() != exp_connection_state.lower():
#print(log_server.fwLSConnStateDesc.lower())
#print(exp_connection_state.lower())
yield Result(state=State(mon_connection_state),
summary=f'Expected connection state: {exp_connection_state}')
......
......@@ -5,6 +5,7 @@
#
# Author: thl-cmk[at]outlook[dot]com
# URL : https://thl-cmk.hopto.org
# Date : 2016-07-29
#
# 2016-07-29: monitor Check Point FWM log server status
# 2018-05-08: changed snmp scan and inventory function
......@@ -14,6 +15,7 @@
# CHECKPOINT-MIB::lsLoggingInfo
# 2020-06-08: changed snmp-scan function
# 2021-06-14: rewrite for cmk 2.0
# 2021-08-09: fixed empty string_table
#
#
......@@ -190,6 +192,7 @@ class CheckPointFwm(NamedTuple):
def parse_checkpoint_fwm_ls(string_table: List[StringTable]) -> CheckPointFwm:
if string_table != [[], []]:
r77, r80_indexer = string_table
lsprodname, lsvermajor, lsverminor, lsbuildnumber, lsfwmisalive, lsstatcode, lsstatshortdescr, lsstatlongdescr = \
r77[0]
......
No preview for this file type
......@@ -13,5 +13,5 @@
'title': 'Check Point Log service status',
'version': '20210614.v0.2',
'version.min_required': '2.0.0',
'version.packaged': '2021.04.10',
'version.packaged': '2021.07.14',
'version.usable_until': None}
\ No newline at end of file
......@@ -38,7 +38,6 @@ def _parameter_valuespec_checkpoint_fw_ls():
MonitoringState(
default_value=1,
title=_('State if connection state differs from expected state.'),
help=_('')
)),
])
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment