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

update project

parent cfb6c44b
Branches 2.2.x
No related tags found
No related merge requests found
......@@ -9,6 +9,13 @@
#
# Monitor status of Cisco BGP Peers (IPv4 and IPv6)
#
# ToDo: move longoutput to inventory, based on inv_bgp_peer
# ToDo: move helper functions to utils/bgp_peer, merge with bgp_peer
# ToDo: merge WATO with bgp_peer
# ToDo: merge metrics with bgp_peer
# ToDo: merge check function with bgp_peer
# goal: only snmp_section and parse function left
#
# 2018-05-24: changed counters to 1/s
# 2018-05-25: a lot of code cleanup
# packet name changed from cisco_bgp to cisco_bgp_peer
......@@ -39,6 +46,7 @@
# 2021-08-22: added WATO option for admin state down
# 2021-08-23: changed service name from "Cisco BGP peer" to "BGP peer" --> streamline with bgp_peer
# get localas from BGP-4-MIB::bgpLocalAs if CISCO-BGP4-MIB::cbgpPeer2LocalAs not set
# 2021-08-29: fixed bgpLocalAs in BGP-4-MIB not set
import re
import time
......@@ -229,7 +237,10 @@ def parse_cisco_bgp_peer(string_table: List[StringTable]) -> Dict[str, Peer]:
cbgpPeer2Entry, cbgpPeer2AddrFamily, bgpLocalAs = string_table
# local as from BGP-4-MIB
bgpLocalAs = bgpLocalAs[0][0]
try:
bgpLocalAs = bgpLocalAs[0][0]
except (IndexError):
bgpLocalAs = 'N/A'
# create dictionary from cbgpPeer2Entry (peer ip address as index)
peer_table = {}
......
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