forked from Checkmk/checkmk
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The Arista BGP check plugin is replaced by a more general BGP peer check plugin. The following new features are added: <ul> <li>Introduction of new SNMP sections cisco_bgp_peerv2 and cisco_bgp_peerv3 <li>Add description or VrfName if available which is available as check result and service label <li>Add established time which is available as check result aswell as a metric <li>Move less important check output to details <li>Add configurable state mapping for admin state and peer state </ul> SUP-10721 Change-Id: I3bf8f4bc92629123513a1282a5ecf6634e24829c
- Loading branch information
Showing
7 changed files
with
286 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
Title: Replace BGP peer check plugin | ||
Class: feature | ||
Compatible: compat | ||
Component: checks | ||
Date: 1679472169 | ||
Edition: cre | ||
Knowledge: undoc | ||
Level: 1 | ||
Version: 2.3.0b1 | ||
|
||
The Arista BGP check plugin is replaced by a more general BGP peer check plugin. | ||
|
||
The following new features are added: | ||
<ul> | ||
<li>Introduction of new SNMP sections cisco_bgp_peerv2 and cisco_bgp_peerv3 | ||
<li>Add description or VrfName if available which is available as check result and service label | ||
<li>Add established time which is available as check result aswell as a metric | ||
<li>Move less important check output to details | ||
<li>Add configurable state mapping for admin state and peer state | ||
</ul> | ||
|
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
title: BGP peer | ||
agents: snmp | ||
catalog: hw/network/arista | ||
license: GPLv2 | ||
distribution: check_mk | ||
description: | ||
Generates service info from basic BGP information provided via SNMP (LocalAddr, LocalIdentifier, | ||
RemoteAs, RemoteIdentifier, AdminStatus, (Peer)State, LastErrorReceivedText, EstablishedTime, Description). | ||
|
||
The following MIBs are supported: ARISTA-BGP4V2-MIB (aristaBgp4V2Objects), CISCO-BGP4-MIB (cbgpPeer2Entry, cbgpPeer3Entry) | ||
|
||
By default the check result is always OK but the AdminStatus and PeerState can be remapped to different states | ||
via configuration. | ||
|
||
item: | ||
One service is created for remote IP address | ||
|
||
discovery: | ||
One service identified |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
#!/usr/bin/env python3 | ||
# Copyright (C) 2019 tribe29 GmbH - License: GNU General Public License v2 | ||
# This file is part of Checkmk (https://checkmk.com). It is subject to the terms and | ||
# conditions defined in the file COPYING, which is part of this source code package. | ||
|
||
from cmk.gui.i18n import _ | ||
from cmk.gui.plugins.wato.utils import ( | ||
CheckParameterRulespecWithItem, | ||
rulespec_registry, | ||
RulespecGroupCheckParametersNetworking, | ||
) | ||
from cmk.gui.valuespec import Dictionary, MonitoringState | ||
|
||
|
||
def _parameter_valuespec_bgp_peer(): | ||
return Dictionary( | ||
elements=[ | ||
( | ||
"admin_state_mapping", | ||
Dictionary( | ||
title=_("Admin States"), | ||
elements=[ | ||
("halted", MonitoringState(title="halted")), | ||
("running", MonitoringState(title="running")), | ||
], | ||
optional_keys=[], | ||
), | ||
), | ||
( | ||
"peer_state_mapping", | ||
Dictionary( | ||
title=_("Peer States"), | ||
elements=[ | ||
("idle", MonitoringState(title="idle")), | ||
("active", MonitoringState(title="active")), | ||
("opensent", MonitoringState(title="opensent")), | ||
("openconfirm", MonitoringState(title="openconfirm")), | ||
("established", MonitoringState(title="established")), | ||
], | ||
optional_keys=[], | ||
), | ||
), | ||
], | ||
) | ||
|
||
|
||
rulespec_registry.register( | ||
CheckParameterRulespecWithItem( | ||
check_group_name="bgp_peer", | ||
group=RulespecGroupCheckParametersNetworking, | ||
match_type="dict", | ||
parameter_valuespec=_parameter_valuespec_bgp_peer, | ||
title=lambda: _("BGP Peer State Mapping"), | ||
) | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.