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

update project

parent 28b05acb
No related branches found
No related tags found
No related merge requests found
......@@ -20,6 +20,7 @@
# 2021-09-21: changed graph definition for packets graph to stack
# 2021-09-24: changed graph definition for connections graph to make it scale with
# the active connections (suggested by raulcurro[at]gmail[dot]com)
# moved Main IP to details, if it is not an IPv4 address
#
# snmpwalk sample
#
......@@ -86,6 +87,7 @@
# }
#
import re
import time
from dataclasses import dataclass
from typing import List, Dict, Optional, Tuple
......@@ -187,8 +189,12 @@ def check_checkpoint_vsx_system(item, params, section: Dict[str, CheckpointVsx])
yield Result(state=State(params['state_sic_not_established']), notice='SIC not established')
if vsx.vsxStatusVsType.lower() in ['virtual system', 'vsx gateway']:
ipv4 = re.compile('^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}')
yield Result(state=State.OK, notice=f'System name: {item}')
yield Result(state=State.OK, summary=f'Main IP: {vsx.vsxStatusMainIP}')
if ipv4.match(vsx.vsxStatusMainIP):
yield Result(state=State.OK, summary=f'Main IP: {vsx.vsxStatusMainIP}')
else:
yield Result(state=State.OK, notice=f'Main IP: {vsx.vsxStatusMainIP}')
yield Result(state=State.OK, summary=f'VS ID: {vsx.vsxStatusVSId}',
details=f'Virtual system ID: {vsx.vsxStatusVSId}')
yield Result(state=State.OK, notice=f'System type: {vsx.vsxStatusVsType}')
......
No preview for this file type
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