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

update project

parent fca1551a
No related branches found
No related tags found
No related merge requests found
......@@ -87,7 +87,7 @@
# }
#
import re
import ipaddress
import time
from dataclasses import dataclass
from typing import List, Dict, Optional, Tuple
......@@ -189,12 +189,13 @@ 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}')
if ipv4.match(vsx.vsxStatusMainIP):
try:
ipaddress.ip_address(vsx.vsxStatusMainIP)
yield Result(state=State.OK, summary=f'Main IP: {vsx.vsxStatusMainIP}')
else:
except ValueError:
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