From 8d7615c40488436b6281fbf52a87a885d79230bf Mon Sep 17 00:00:00 2001 From: thl-cmk <thl-cmk@outlook.com> Date: Mon, 18 Apr 2022 08:39:16 +0000 Subject: [PATCH] Delete huawei_bgp_peers.py --- web/plugins/metrics/huawei_bgp_peers.py | 122 ------------------------ 1 file changed, 122 deletions(-) delete mode 100644 web/plugins/metrics/huawei_bgp_peers.py diff --git a/web/plugins/metrics/huawei_bgp_peers.py b/web/plugins/metrics/huawei_bgp_peers.py deleted file mode 100644 index ac76d75..0000000 --- a/web/plugins/metrics/huawei_bgp_peers.py +++ /dev/null @@ -1,122 +0,0 @@ -#!/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, - }) -- GitLab