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

update project

parent 801b6e47
No related branches found
No related tags found
No related merge requests found
......@@ -117,31 +117,33 @@ _fwLocalLoggingStat = {
}
def parse_checkpoint_fw_ls(string_table: List[StringTable]) -> Dict:
if string_table != [[], []]:
over_all, log_servers = string_table
def parse_checkpoint_fw_ls(string_table: List[StringTable]) -> Optional[Dict]:
over_all, log_servers = string_table
try:
fwlsconnoverall, fwlsconnoveralldesc, fwlocalloggingdesc, fwlocalloggingstat, fwlocalloggingwriterate, \
fwlogginghandlingrate = over_all[0]
parsed = {}
parsed.update({'over all': CheckPointFwLsOverAll(
fwlsconnoverall=int(fwlsconnoverall),
fwlsconnoveralldesc=fwlsconnoveralldesc,
fwlocalloggingdesc=fwlocalloggingdesc,
fwlocalloggingstat=int(fwlocalloggingstat),
fwLocalLoggingWriteRate=int(fwlocalloggingwriterate) if fwlocalloggingwriterate.isdigit() else None,
fwLoggingHandlingRate=int(fwlogginghandlingrate) if fwlogginghandlingrate.isdigit() else None,
except (IndexError, ValueError):
return
parsed = {}
parsed.update({'over all': CheckPointFwLsOverAll(
fwlsconnoverall=int(fwlsconnoverall),
fwlsconnoveralldesc=fwlsconnoveralldesc,
fwlocalloggingdesc=fwlocalloggingdesc,
fwlocalloggingstat=int(fwlocalloggingstat),
fwLocalLoggingWriteRate=int(fwlocalloggingwriterate) if fwlocalloggingwriterate.isdigit() else None,
fwLoggingHandlingRate=int(fwlogginghandlingrate) if fwlogginghandlingrate.isdigit() else None,
)})
for fwLSConnIndex, fwLSConnName, fwLSConnState, fwLSConnStateDesc, fwLSConnSendRate in log_servers:
parsed.update({fwLSConnName: CheckPointFwLs(
fwLSConnIndex=int(fwLSConnIndex),
fwLSConnName=fwLSConnName,
fwLSConnState=int(fwLSConnState),
fwLSConnStateDesc=fwLSConnStateDesc,
fwLSConnSendRate=int(fwLSConnSendRate) if fwLSConnSendRate.isdigit() else None,
)})
for fwLSConnIndex, fwLSConnName, fwLSConnState, fwLSConnStateDesc, fwLSConnSendRate in log_servers:
parsed.update({fwLSConnName: CheckPointFwLs(
fwLSConnIndex=int(fwLSConnIndex),
fwLSConnName=fwLSConnName,
fwLSConnState=int(fwLSConnState),
fwLSConnStateDesc=fwLSConnStateDesc,
fwLSConnSendRate=int(fwLSConnSendRate) if fwLSConnSendRate.isdigit() else None,
)})
return parsed
......
......@@ -191,9 +191,7 @@ def parse_checkpoint_fwm_ls(string_table: List[StringTable]) -> Optional[CheckPo
try:
lsvermajor, lsverminor, lsbuildnumber, lsfwmisalive, lsstatcode, lsstatshortdescr, \
lsstatlongdescr = string_table[0][0]
except IndexError:
return
except ValueError:
except (IndexError, ValueError):
return
checkpointfwmr77 = CheckPointFwmR77(
......
No preview for this file type
......@@ -13,5 +13,5 @@
'title': 'Check Point Log service status',
'version': '20210816.v0.2b',
'version.min_required': '2.0.0',
'version.packaged': '2021.07.14',
'version.packaged': '2021.09.20',
'version.usable_until': None}
\ No newline at end of file
......@@ -10,7 +10,6 @@ from cmk.gui.i18n import _
from cmk.gui.valuespec import (
Dictionary,
TextAscii,
FixedValue,
MonitoringState,
DropdownChoice,
)
......
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