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

update project

parent 70e2d9ec
No related branches found
No related tags found
No related merge requests found
......@@ -20,6 +20,9 @@
# IKE_OID_end and cipSecTunIkeTunnelIndex, try to match IPSec nad IKE sa by remote address
# 2022-04-01: changed IPSec SA count output to check levels
# 2022-12-17: check input values for isdigit()
# 2023-06-07: fixed ValueError (not enough values to unpack (expected 10, got 4)) in parse function (ipsec_tunnel_entry)
# 2023-06-07: fixed ValueError (not enough values to unpack (expected 18, got 4)) in parse function (ike_tunnel_entry)
#
# snmpwalk sample
#
......@@ -150,8 +153,12 @@ def parse_cisco_vpn_tunnel(string_table: List[StringTable]) -> Dict[str, IkeSa]:
ike_tunnel_entry, ipsec_tunnel_entry = string_table
# summarize IPSec SAs, ASSUMPTION: except for counters all SA attributes are identical per IKE index
for ike_tunnel_index, ike_tunnel_alive, tun_remote_addr, active_time, hc_in_octets, in_pkts, in_drop_pkts, \
hc_out_octets, out_pkts, out_drop_pkts in ipsec_tunnel_entry:
for entry in ipsec_tunnel_entry:
try:
ike_tunnel_index, ike_tunnel_alive, tun_remote_addr, active_time, hc_in_octets, in_pkts, in_drop_pkts, \
hc_out_octets, out_pkts, out_drop_pkts = entry
except ValueError:
continue
if ike_tunnel_index.isdigit():
ipsec_sa = ipsec_sa_summary.setdefault(
......@@ -169,9 +176,13 @@ def parse_cisco_vpn_tunnel(string_table: List[StringTable]) -> Dict[str, IkeSa]:
ipsec_sa.active_time = int(active_time) // 100
# IKE SA
for index, local_type, local_value, local_addr, local_name, remote_type, remote_value, remote_addr, remote_name, \
active_time, in_octets, in_pkts, in_droppkts, out_octets, out_pkts, out_droppkts, status, \
nego_mode in ike_tunnel_entry:
for entry in ike_tunnel_entry:
try:
index, local_type, local_value, local_addr, local_name, remote_type, remote_value, remote_addr, remote_name, \
active_time, in_octets, in_pkts, in_droppkts, out_octets, out_pkts, out_droppkts, status, \
nego_mode = entry
except ValueError:
continue
if index.isdigit():
save_remote_addr = remote_addr
......
File added
No preview for this file type
......@@ -13,5 +13,5 @@
'title': 'Monitor Cisco VPN Tunnel',
'version': '20221217.v0.3b',
'version.min_required': '2.0.0',
'version.packaged': '2021.09.20',
'version.packaged': '2.1.0p21',
'version.usable_until': None}
\ No newline at end of file
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