From 013f10227e72ac281c782f90d9f7370dcd3a1398 Mon Sep 17 00:00:00 2001 From: thl-cmk <thl-cmk@outlook.com> Date: Mon, 6 Mar 2023 14:04:34 +0000 Subject: [PATCH] Delete cisco_asyncos.py --- web/plugins/metrics/cisco_asyncos.py | 167 --------------------------- 1 file changed, 167 deletions(-) delete mode 100644 web/plugins/metrics/cisco_asyncos.py diff --git a/web/plugins/metrics/cisco_asyncos.py b/web/plugins/metrics/cisco_asyncos.py deleted file mode 100644 index 6159bc9..0000000 --- a/web/plugins/metrics/cisco_asyncos.py +++ /dev/null @@ -1,167 +0,0 @@ -#!/usr/bin/env python3 -# -*- coding: utf-8 -*- -# -# Cisco AsyncOS metrics plugin -# -# Author: Th.L. -# Date : 2020-03-08 -# -from cmk.gui.i18n import _ - -from cmk.gui.plugins.metrics import ( - metric_info, - graph_info, - perfometer_info, -) - - -##################################################################################################################### -# -# define metrics for perfdata -# -##################################################################################################################### - - -metric_info['cisco_asyncos_dns_outstandingdnsrequests'] = { - 'title': _('Awaiting answer'), - 'help': _('Number of DNS requests that have been sent but for which no reply has been received.'), - 'unit': 'count', - 'color': '26/a', -} - -metric_info['cisco_asyncos_dns_pendingdnsrequests'] = { - 'title': _('Waiting to be send'), - 'help': _('Number of DNS requests waiting to be sent.'), - 'unit': 'count', - 'color': '22/a', -} - -metric_info['cisco_asyncos_messageage_oldestmessageage'] = { - 'title': _('Oldest message age'), - 'help': _('The number of seconds the oldest message has been in queue.'), - 'unit': 's', - 'color': '26/a', -} - -metric_info['cisco_asyncos_queue_work_queue'] = { - 'title': _('Work queue'), - 'help': _('Number of messages in the queue.'), - 'unit': 'count', - 'color': '26/a', -} - -metric_info['cisco_asyncos_mem_mem_used'] = { - 'title': _('Memory used'), - 'help': _('Memory used.'), - 'unit': '%', - 'color': '26/a', -} - -###################################################################################################################### -# -# map perfdata to metric -# -###################################################################################################################### - -# check_metrics['check_mk-cisco_asyncos_dns'] = { -# 'outstandingdnsrequests': {'name': 'cisco_asyncos_dns_outstandingdnsrequests', }, -# 'pendingdnsrequests': {'name': 'cisco_asyncos_dns_pendingdnsrequests', }, -# } -# -# check_metrics['check_mk-cisco_asyncos_messageage'] = { -# 'oldestmessageage': {'name': 'cisco_asyncos_messageage_oldestmessageage', }, -# } -# -# check_metrics['check_mk-cisco_asyncos_queue'] = { -# 'queue': {'name': 'cisco_asyncos_queue_work_queue', }, -# } -# -# check_metrics['check_mk-cisco_asyncos_mem'] = { -# 'mem_used': {'name': 'cisco_asyncos_mem_mem_used', }, -# } - - -###################################################################################################################### -# -# how to graph perdata -# -###################################################################################################################### - -graph_info['cisco_async_dns'] ={ - 'title': _('AsyncOS DNS requests'), - 'metrics': [ - ('cisco_asyncos_dns_pendingdnsrequests', '-area'), - ('cisco_asyncos_dns_outstandingdnsrequests', 'area'), - ], -} - -graph_info['cisco_async_messageage']={ - 'title': _('AsyncOS oldest message age'), - 'metrics': [ - ('cisco_asyncos_messageage_oldestmessageage', 'area'), - ], -} - -graph_info['cisco_asyncos_queue']={ - 'title': _('AsyncOS E-Mail work queue'), - 'metrics': [ - ('cisco_asyncos_queue_work_queue', 'area'), - ], - 'scalars': [ - ('cisco_asyncos_queue_work_queue:crit', _('crit')), - ('cisco_asyncos_queue_work_queue:warn', _('warn')), - ], -} - -graph_info['cisco_asyncos_mem']={ - 'title': _('AsyncOS Memory used'), - 'metrics': [ - ('cisco_asyncos_mem_mem_used', 'area'), - ], - 'scalars': [ - ('cisco_asyncos_mem_mem_used:crit', _('crit')), - ('cisco_asyncos_mem_mem_used:warn', _('warn')), - ], -} - -###################################################################################################################### -# -# define perf-o-meter -# -###################################################################################################################### - -perfometer_info.append(('stacked', [ - { - 'type': 'linear', - 'segments': ['cisco_asyncos_dns_outstandingdnsrequests', - ], - 'total': 100, - }, - { - 'type': 'linear', - 'segments': ['cisco_asyncos_dns_pendingdnsrequests', - ], - 'total': 100, - } -])) - -perfometer_info.append({ - 'type': 'logarithmic', - 'metric': 'cisco_asyncos_messageage_oldestmessageage', - 'half_value': 2592000.0, - 'exponent': 2, -}) - - -perfometer_info.append({ - 'type': 'logarithmic', - 'metric': 'cisco_asyncos_queue_work_queue', - 'half_value': 500.0, - 'exponent': 2, -}) - -perfometer_info.append({ - 'type': 'linear', - 'segments': ['cisco_asyncos_mem_mem_used'], - 'total': 100 -}) \ No newline at end of file -- GitLab