diff --git a/checks/cisco_asyncos_conn b/checks/cisco_asyncos_conn deleted file mode 100644 index a66954bb91abdad7f7df05a9bfee41241d34fa67..0000000000000000000000000000000000000000 --- a/checks/cisco_asyncos_conn +++ /dev/null @@ -1,64 +0,0 @@ -#!/usr/bin/python -# -*- encoding: utf-8; py-indent-offset: 4 -*- -# +------------------------------------------------------------------+ -# | ____ _ _ __ __ _ __ | -# | / ___| |__ ___ ___| | __ | \/ | |/ / | -# | | | | '_ \ / _ \/ __| |/ / | |\/| | ' / | -# | | |___| | | | __/ (__| < | | | | . \ | -# | \____|_| |_|\___|\___|_|\_\___|_| |_|_|\_\ | -# | | -# | Copyright Mathias Kettner 2013 mk@mathias-kettner.de | -# +------------------------------------------------------------------+ -# -# This file is part of Check_MK. -# The official homepage is at http://mathias-kettner.de/check_mk. -# -# check_mk is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation in version 2. check_mk is distributed -# in the hope that it will be useful, but WITHOUT ANY WARRANTY; with- -# out even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. See the GNU General Public License for more de- -# ails. You should have received a copy of the GNU General Public -# License along with GNU Make; see the file COPYING. If not, write -# to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, -# Boston, MA 02110-1301 USA. -# -# only use full for Cisco WSA appliances -# - - -cisco_asyncos_conn_default_levels = {} - - -def inventory_cisco_asyncos_conn(info): - if len(info) > 0: - return [(None, 'cisco_asyncos_conn_default_levels')] - - -def check_cisco_asyncos_conn(_no_item, params, info): - state = 0 - perfdata = [] - warn, crit = None, None - idle, total, max = info[0] - active = int(total) - int(idle) - perfdata.append(('active', active, warn, crit, 0, int(max))) - perfdata.append(('idle', idle, '', '', 0, int(max))) - infotext = '%s Active Connections - %s Idle Connections - Maximum Connections was %s' % (active, idle, max) - return state, infotext, perfdata - - -check_info['cisco_asyncos_conn'] = { - 'check_function': check_cisco_asyncos_conn, - 'inventory_function': inventory_cisco_asyncos_conn, - 'service_description': 'Connection Stats', - 'has_perfdata': True, - 'snmp_info': ('.1.3.6.1.4.1.15497.1.2.3.2', [ # ASYNCOSWEBSECURITYAPPLIANCE-MIB::proxyClientSidePerf - '7', # cacheClientIdleConns - '8', # cacheClientTotalConns - '9', # cacheClientMaxConns - ]), - 'snmp_scan_function': lambda oid: oid('.1.3.6.1.2.1.1.1.0').find('AsyncOS') != -1, - # 'snmp_scan_function': scan_cisco_asyncos, - # 'includes': ['cisco_asyncos.include'], -} diff --git a/checks/cisco_asyncos_dns b/checks/cisco_asyncos_dns deleted file mode 100644 index 579959db70fb87849d0e21880f04e1ae9d3538a5..0000000000000000000000000000000000000000 --- a/checks/cisco_asyncos_dns +++ /dev/null @@ -1,73 +0,0 @@ -#!/usr/bin/python -# -*- encoding: utf-8; py-indent-offset: 4 -*- -# -# Author: Th.L. -# Date: 08-03-2020 -# -# monitors status Cisco IronPort Appliances (ESA) DNS requests -# Tested with: C380, C370 -# -# check_mk is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation in version 2. check_mk is distributed -# in the hope that it will be useful, but WITHOUT ANY WARRANTY; with- -# out even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. See the GNU General Public License for more de- -# tails. You should have received a copy of the GNU General Public -# License along with GNU Make; see the file COPYING. If not, write -# to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, -# Boston, MA 02110-1301 USA. -# -# .1.3.6.1.4.1.15497.1.1.1.15.0 = Gauge32: 0 -# .1.3.6.1.4.1.15497.1.1.1.16.0 = Gauge32: 0 -# -# ASYNCOS-MAIL-MIB::outstandingDNSRequests.0 = Gauge32: 0 -# ASYNCOS-MAIL-MIB::pendingDNSRequests.0 = Gauge32: 0 -# -# sample info -# [[u'0', u'0']] -# - -factory_settings['cisco_asyncos_dns_default_levels'] = { - -} - - -def inventory_cisco_asyncos_dns(info): - if len(info[0]) == 2: - return [(None, None)] - -def check_cisco_asyncos_dns(_no_item, params, info): - if len(info[0]) == 2: - outstandingDNSRequests, pendingDNSRequests = info[0] - - outstandingDNSRequests = int(outstandingDNSRequests) - pendingDNSRequests = int(pendingDNSRequests) - - # Outstanding DNS requests --> DNS requests awaiting answer - # Pending DNS requests --> DNS requests waiting to be send - infotext = 'DNS requests awaiting answer: %d, DNS requests waiting to be send: %d' %(outstandingDNSRequests, pendingDNSRequests) - - perfdata = [] - perfdata.append(('outstandingdnsrequests', outstandingDNSRequests)) - perfdata.append(('pendingdnsrequests', pendingDNSRequests)) - - return 0, infotext, perfdata - -check_info['cisco_asyncos_dns'] = { - 'inventory_function': inventory_cisco_asyncos_dns, - 'check_function': check_cisco_asyncos_dns, - 'group': 'aysncos_dns', - 'service_description': 'DNS requests', - 'has_perfdata': True, - 'snmp_info': ( - '.1.3.6.1.4.1.15497.1.1.1', # ASYNCOS-MAIL-MIB - [ - '15', # outstandingDNSRequests - '16', # pendingDNSRequests - ]), - 'default_levels_variable': 'cisco_asyncos_dns_default_levels', - 'snmp_scan_function': lambda oid: oid('.1.3.6.1.2.1.1.1.0').find('AsyncOS') != -1, - # 'snmp_scan_function': scan_cisco_asyncos, - # 'includes': ['cisco_asyncos.include'], -} diff --git a/checks/cisco_asyncos_messageage b/checks/cisco_asyncos_messageage deleted file mode 100644 index b1e3ee5ebf64dd2dae51b5875a933eb0ef8886e4..0000000000000000000000000000000000000000 --- a/checks/cisco_asyncos_messageage +++ /dev/null @@ -1,78 +0,0 @@ -#!/usr/bin/python -# -*- encoding: utf-8; py-indent-offset: 4 -*- -# -# Author: Th.L. -# Date: 08-03-2020 -# -# monitors status Cisco IronPort Appliances (ESA) oldest message age -# Tested with: C380, C370 -# -# check_mk is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation in version 2. check_mk is distributed -# in the hope that it will be useful, but WITHOUT ANY WARRANTY; with- -# out even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. See the GNU General Public License for more de- -# tails. You should have received a copy of the GNU General Public -# License along with GNU Make; see the file COPYING. If not, write -# to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, -# Boston, MA 02110-1301 USA. -# -# .1.3.6.1.4.1.15497.1.1.1.14.0 = Gauge32: 258454 -# -# ASYNCOS-MAIL-MIB::oldestMessageAge.0 = Gauge32: 259706 -# -# sample info -# [[u'258454']] -# - -factory_settings['cisco_asyncos_messageage_default_levels'] = { - -} - - -def inventory_cisco_asyncos_messageage(info): - if len(info[0]) == 1: - return [(None, None)] - -def check_cisco_asyncos_messageage(_no_item, params, info): - def get_messageage(messageage): # expects time in seconds - m, s = divmod(messageage, 60) # break in seconds / minutes - h, m = divmod(m, 60) # break in mintes / hours - if h >= 24: # more then one day - d, h = divmod(h, 24) # break in hours / days - else: - return '%02d:%02d:%02d' % (h, m, s) - if d >= 365: # more the one year - y, d = divmod(d, 365) # break in days / years - return '%dy %dd %02d:%02d:%02d' % (y, d, h, m, s) - else: - return '%dd %02d:%02d:%02d' % (d, h, m, s) - - if len(info[0]) == 1: - oldestMessageAge = int(info[0][0]) - - perfdata = [] - perfdata.append(('oldestmessageage', oldestMessageAge)) - - infotext = 'Oldest message age: %s' %(get_messageage(oldestMessageAge)) - - return 0, infotext, perfdata - - -check_info['cisco_asyncos_messageage'] = { - 'inventory_function': inventory_cisco_asyncos_messageage, - 'check_function': check_cisco_asyncos_messageage, - 'group': 'aysncos_messageage', - 'service_description': 'Message age', - 'has_perfdata': True, - 'snmp_info': ( - '.1.3.6.1.4.1.15497.1.1.1', # ASYNCOS-MAIL-MIB - [ - '14', # oldestMessageAge - ]), - 'default_levels_variable': 'cisco_asyncos_messageage_default_levels', - 'snmp_scan_function': lambda oid: oid('.1.3.6.1.2.1.1.1.0').find('AsyncOS') != -1, - # 'snmp_scan_function': scan_cisco_asyncos, - # 'includes': ['cisco_asyncos.include'], -} diff --git a/checks/cisco_asyncos_queue b/checks/cisco_asyncos_queue deleted file mode 100644 index e4105d0ba04f2101f8fe8e2ef5ef45f2a3748b05..0000000000000000000000000000000000000000 --- a/checks/cisco_asyncos_queue +++ /dev/null @@ -1,86 +0,0 @@ -#!/usr/bin/python -# -*- encoding: utf-8; py-indent-offset: 4 -*- -# -# Rewritten by: Th.L. -# Date: 10-02-2020 -# -# added wato, fixed inventory function, changed snmp scan function, changed item to 'work queue' -# -# +------------------------------------------------------------------+ -# | ____ _ _ __ __ _ __ | -# | / ___| |__ ___ ___| | __ | \/ | |/ / | -# | | | | '_ \ / _ \/ __| |/ / | |\/| | ' / | -# | | |___| | | | __/ (__| < | | | | . \ | -# | \____|_| |_|\___|\___|_|\_\___|_| |_|_|\_\ | -# | | -# | Copyright Mathias Kettner 2013 mk@mathias-kettner.de | -# +------------------------------------------------------------------+ -# -# This file is part of Check_MK. -# The official homepage is at http://mathias-kettner.de/check_mk. -# -# check_mk is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation in version 2. check_mk is distributed -# in the hope that it will be useful, but WITHOUT ANY WARRANTY; with- -# out even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. See the GNU General Public License for more de- -# ails. You should have received a copy of the GNU General Public -# License along with GNU Make; see the file COPYING. If not, write -# to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, -# Boston, MA 02110-1301 USA. -# - - -factory_settings['cisco_asyncos_queue_default_levels'] = { - 'levels': (50, 100), # warn/crit # of messages in work queue -} - - -def inventory_cisco_asyncos_queue(info): - if len(info) > 0: - return [(None, None)] - - -def check_cisco_asyncos_queue(_no_item, params, info): - warn, crit = params.get('levels', (50, 100)) - - queuestatus, workqueuesize = info[0] - - queuestatus = int(queuestatus) - workqueuesize = int(workqueuesize) - - perfdata=[('queue', workqueuesize, warn, crit)] - - infotext = '%d message(s) in work queue' % workqueuesize - if workqueuesize >= crit: - yield 2, infotext + ' (critical at %d)' % crit, perfdata - elif workqueuesize >= warn: - yield 1, infotext + ' (warning at %d)' % warn, perfdata - else: - yield 0, infotext, perfdata - - if queuestatus == 1: - yield 0, 'Queue space: enough' - elif queuestatus == 2: - yield 1, 'Queue space: near full' - elif queuestatus == 3: - yield 2, 'Queue space: full' - -check_info['cisco_asyncos_queue'] = { - 'check_function': check_cisco_asyncos_queue, - 'inventory_function': inventory_cisco_asyncos_queue, - 'group': 'cisco_asyncos_queue', - 'service_description': 'Queue', - 'has_perfdata': True, - 'snmp_info': ('.1.3.6.1.4.1.15497.1.1.1', [ # ASYNCOS-MAIL-MIB: - '5', # queueAvailabilityStatus - '11' # workQueueMessages - ] - ), - 'default_levels_variable': 'cisco_asyncos_queue_default_levels', - 'snmp_scan_function': lambda oid: oid('.1.3.6.1.2.1.1.1.0').find('AsyncOS') != -1, - # 'snmp_scan_function': scan_cisco_asyncos, - # 'includes': ['cisco_asyncos.include'], -} - diff --git a/cisco_asyncos.mkp b/cisco_asyncos.mkp index be691ccdddc54f9082d6cd64f3b2730339bad591..9c7a7def77a4f84f6aafb891b353508e92bbe896 100644 Binary files a/cisco_asyncos.mkp and b/cisco_asyncos.mkp differ