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

Delete cisco_asyncos.py

parent 2c21adf8
No related branches found
No related tags found
No related merge requests found
#!/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
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