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

modified for check APIv2

parent 9fc82c74
No related branches found
No related tags found
No related merge requests found
[PACKAGE]: ../../raw/master/mkp/arista_bgp_peer-1.0.0-20230613.mkp "arista_bgp_peer-1.0.0-20230613.mkp"
[PACKAGE]: ../../raw/master/mkp/arista_bgp_peer-1.0.1-20250329.mkp "arista_bgp_peer-1.0.1-20250329.mkp"
# BGP peer
Monitors the status of Arista Networks BGP peers (IPv4 and IPv6)
......
File added
......@@ -9,31 +9,30 @@
#
# Monitor status of Arista Networks BGP Peers (IPv4 and IPv6)
#
#
#
# 2025-03-29: moved to check APIv2 to prepare for CMK2.4
import copy
from typing import List, Dict, Optional, Tuple
from dataclasses import dataclass
from typing import Dict, List, Optional, Tuple
from cmk.base.plugins.agent_based.agent_based_api.v1 import (
register,
SNMPTree,
startswith,
OIDEnd,
from cmk.agent_based.v2 import (
OIDBytes,
)
from cmk.base.plugins.agent_based.agent_based_api.v1.type_defs import (
OIDEnd,
SNMPSection,
SNMPTree,
StringByteTable,
startswith,
)
from cmk.base.plugins.agent_based.utils.bgp_peer import (
from cmk_addons.plugins.bgp_peer.lib.bgp_peer import (
BgpPeer,
bgp_get_peer_entry,
bgp_get_ip_address_from_oid,
bgp_get_peer_entry,
)
from cmk.base.plugins.agent_based.utils.arista_bgp_peer import (
from cmk_addons.plugins.bgp_peer.lib.arista_bgp_peer import (
arista_afi_safi_mapping,
)
......@@ -109,7 +108,7 @@ def parse_arista_bgp_peer(string_table: List[StringByteTable]) -> Optional[Dict[
return peer_table
register.snmp_section(
snmp_section_arista_bgp_peer=SNMPSection(
name='arista_bgp_peer',
parse_function=parse_arista_bgp_peer,
parsed_section_name='bgp_peer',
......
......@@ -9,29 +9,29 @@
#
# inventory of Arista Networks BGP Peers (IPv4 and IPv6)
#
#
# 2025-03-29: moved to check APIv2 to prepare for CMK2.4
from typing import List
from cmk.base.plugins.agent_based.agent_based_api.v1 import (
register,
SNMPTree,
from cmk.agent_based.v2 import (
OIDBytes,
startswith,
OIDEnd,
)
from cmk.base.plugins.agent_based.agent_based_api.v1.type_defs import (
SNMPSection,
SNMPTree,
StringByteTable,
startswith,
)
from cmk.base.plugins.agent_based.utils.bgp_peer import (
from cmk_addons.plugins.bgp_peer.lib.bgp_peer import (
InvBgpPeer,
bgp_error_as_string,
bgp_error_code_as_hex,
bgp_get_ip_address_from_oid,
bgp_render_ip_address,
get_bgp_type,
bgp_get_ip_address_from_oid,
)
from cmk.base.plugins.agent_based.utils.arista_bgp_peer import (
from cmk_addons.plugins.bgp_peer.lib.arista_bgp_peer import (
arista_afi_safi_mapping,
)
......@@ -85,7 +85,7 @@ def parse_inv_arista_bgp_peer(string_table: List[StringByteTable]):
return bgp_peers
register.snmp_section(
snmp_section_inv_arista_bgp_peer=SNMPSection(
name='inv_arista_bgp_peer',
parse_function=parse_inv_arista_bgp_peer,
parsed_section_name='inv_bgp_peer',
......
......@@ -20,12 +20,12 @@
'NOTE: this plugin will supersede the original arista_bgp '
'plugin\n',
'download_url': 'https://thl-cmk.hopto.org/gitlab/arista/arista_bgp_peer',
'files': {'agent_based': ['arista_bgp_peer.py',
'inv_arista_bgp_peer.py',
'utils/arista_bgp_peer.py']},
'files': {'cmk_addons_plugins': ['bgp_peer/agent_based/arista_bgp_peer.py',
'bgp_peer/lib/arista_bgp_peer.py',
'bgp_peer/agent_based/inv_arista_bgp_peer.py']},
'name': 'arista_bgp_peer',
'title': 'Arista BGP peer',
'version': '1.0.0-20230613',
'version.min_required': '2.0.0b1',
'version.packaged': '2.2.0p24',
'version.usable_until': None}
'version': '1.0.1-20250329',
'version.min_required': '2.3.0b1',
'version.packaged': 'cmk-mkp-tool 0.2.0',
'version.usable_until': '2.5.0b1'}
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