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