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

Delete cisco_vpn_tunnel.py

parent 1e7c71cb
No related branches found
No related tags found
No related merge requests found
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# License: GNU General Public License v2
# Author: thl-cmk[at]outlook[dot]com
# URL : https://thl-cmk.hopto.org
# Date : 2017-12-28
from cmk.gui.i18n import _
from cmk.gui.valuespec import (
Dictionary,
TextAscii,
Tuple,
MonitoringState,
ListOf,
IPv4Address,
TextUnicode,
FixedValue,
)
from cmk.gui.plugins.wato import (
CheckParameterRulespecWithItem,
rulespec_registry,
RulespecGroupCheckParametersNetworking,
RulespecGroupCheckParametersDiscovery,
HostRulespec,
)
def _parameter_valuespec_cisco_vpn_tunnel():
return Dictionary(
elements=[
('tunnels',
ListOf(
Tuple(
title=_('VPN Tunnel Endpoints'),
elements=[
IPv4Address(
title=_('Peer IP-Address'),
help=_('The configured value must match a tunnel reported by the monitored '
'device.'),
),
TextUnicode(
title=_('Tunnel Alias'),
help=_('You can configure an individual alias here for the tunnel matching '
'the IP-Address or Name configured in the field above.'),
),
MonitoringState(
default_value=2,
title=_('State if tunnel is not found'),
),
MonitoringState(
default_value=1,
title=_('State if tunnel has no active IPSec SA'),
),
]),
add_label=_('Add tunnel'),
movable=False,
title=_('VPN tunnel specific configuration'),
)),
('state',
MonitoringState(
title=_('Default state to report when tunnel can not be found anymore'),
help=_('Default state if a tunnel, which is not listed above in this rule, '
'can no longer be found.'),
default_value=2,
)),
('missing_ipsec_sa_state',
MonitoringState(
title=_('Default state to report when tunnel has no active IPSec SA'),
help=_('Default state if a tunnel, which is not listed above in this rule, '
'has no active IPSec SA.'),
default_value=1,
)),
],
)
rulespec_registry.register(
CheckParameterRulespecWithItem(
check_group_name='cisco_vpn_tunnel',
group=RulespecGroupCheckParametersNetworking,
item_spec=lambda: TextAscii(title=_('IP-Address of Tunnel Endpoint'), ),
match_type='dict',
parameter_valuespec=_parameter_valuespec_cisco_vpn_tunnel,
title=lambda: _('Cisco VPN Tunnel'),
))
def _valuespec_discovery_cisco_vpn_tunnel():
return Dictionary(
title=_('VPN Tunnel discovery'),
elements=[(
'discover_aggressive_mode',
FixedValue(
True,
default_value=False,
title=_('Discover aggressive mode VPN Tunnel'),
totext=_('Discover aggressive mode VPN Tunnel'),
),
)],
)
rulespec_registry.register(
HostRulespec(
group=RulespecGroupCheckParametersDiscovery,
match_type='dict',
name='discovery_cisco_vpn_tunnel',
valuespec=_valuespec_discovery_cisco_vpn_tunnel,
))
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