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

Delete huawei_bgp_peers.py

parent 3dfdda42
No related branches found
No related tags found
No related merge requests found
#!/usr/bin/python
# -*- encoding: utf-8; py-indent-offset: 4 -*-
#
# License: GNU General Public License v2
#
# Author: thl-cmk[at]outlook[dot]com
# URL : https://thl-cmk.hopto.org
# Date : 2020-06-22
#
# Huawei BGP Peer
#
# 2020-07-20: added BGP prefix counter
#
try:
from cmk.gui.i18n import _
from cmk.gui.plugins.metrics import (
metric_info,
graph_info,
check_metrics,
)
except:
pass
###############################################################################
#
# define units
#
###############################################################################
###############################################################################
#
# define metrics
#
###############################################################################
metric_info['huawei_bgp_peers_fsmestablishedtransitions'] = {
'title': _('FMS transitions'),
'unit': 'count',
'color': '23/a',
}
metric_info['huawei_bgp_peers_fsmestablishedtime'] = {
'title': _('FMS last change'),
'unit': 's',
'color': '26/a',
}
metric_info['huawei_bgp_peers_prefixrcvcounter'] = {
'title': _('Prefixes received'),
'unit': 's',
'color': '11/a',
}
metric_info['huawei_bgp_peers_prefixactivecounter'] = {
'title': _('Prefixes active'),
'unit': 's',
'color': '33/a',
}
metric_info['huawei_bgp_peers_prefixadvcounter'] = {
'title': _('Prefixes advertised'),
'unit': 's',
'color': '43/a',
}
###############################################################################
#
# map perfdata to metric
#
###############################################################################
check_metrics['check_mk-huawei_bgp_peers'] = {
'fsmestablishedtransitions': {'name': 'huawei_bgp_peers_fsmestablishedtransitions', },
'fsmestablishedtime': {'name': 'huawei_bgp_peers_fsmestablishedtime', },
'prefixrcvcounter': {'name': 'huawei_bgp_peers_prefixrcvcounter', },
'prefixactivecounter': {'name': 'huawei_bgp_peers_prefixactivecounter', },
'prefixadvcounter': {'name': 'huawei_bgp_peers_prefixadvcounter', },
}
###############################################################################
#
# how to graph
#
###############################################################################
graph_info.append({
'title': _('FMS transitions from/to established'),
'metrics': [
('huawei_bgp_peers_fsmestablishedtransitions', 'line'),
],
})
graph_info.append({
'title': _('FMS established last change'),
'metrics': [
('huawei_bgp_peers_fsmestablishedtime', 'line'),
]
})
graph_info.append({
'title': _('BGP prefix counter'),
'metrics': [
('huawei_bgp_peers_prefixrcvcounter', 'line'),
('huawei_bgp_peers_prefixactivecounter', 'line'),
('huawei_bgp_peers_prefixadvcounter', 'line'),
]
})
###############################################################################
#
# define perf-o-meter
#
###############################################################################
perfometer_info.append({
'type': 'logarithmic',
'metric': 'huawei_bgp_peers_fsmestablishedtime',
'half_value': 2592000.0,
'exponent': 2,
})
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