From cd498187912d13883631f5b4430deccdd4ce5975 Mon Sep 17 00:00:00 2001 From: thl-cmk <thl-cmk@outlook.com> Date: Fri, 10 Sep 2021 09:47:28 +0000 Subject: [PATCH] Delete checkpoint_asg_smo_counters --- checks/checkpoint_asg_smo_counters | 175 ----------------------------- 1 file changed, 175 deletions(-) delete mode 100644 checks/checkpoint_asg_smo_counters diff --git a/checks/checkpoint_asg_smo_counters b/checks/checkpoint_asg_smo_counters deleted file mode 100644 index 142919c..0000000 --- a/checks/checkpoint_asg_smo_counters +++ /dev/null @@ -1,175 +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-11-09 -# -# Monitor Check Point Maestro SMO SGM Counters -# -# sample snmpwalk -# .1.3.6.1.4.1.2620.1.48.20.1.0 = STRING: "111802" -# .1.3.6.1.4.1.2620.1.48.20.2.0 = STRING: "0" -# .1.3.6.1.4.1.2620.1.48.20.3.0 = STRING: "84" -# .1.3.6.1.4.1.2620.1.48.20.4.0 = STRING: "91" -# .1.3.6.1.4.1.2620.1.48.20.5.0 = STRING: "N/A" -# .1.3.6.1.4.1.2620.1.48.20.6.0 = STRING: "0" -# .1.3.6.1.4.1.2620.1.48.20.7.0 = STRING: "0" -# .1.3.6.1.4.1.2620.1.48.20.8.0 = STRING: "9" -# .1.3.6.1.4.1.2620.1.48.20.9.0 = STRING: "79" -# .1.3.6.1.4.1.2620.1.48.20.10.0 = STRING: "1" -# .1.3.6.1.4.1.2620.1.48.20.11.0 = STRING: "0" -# .1.3.6.1.4.1.2620.1.48.20.12.0 = STRING: "0" -# .1.3.6.1.4.1.2620.1.48.20.13.0 = STRING: "0" -# .1.3.6.1.4.1.2620.1.48.20.14.0 = STRING: "1" -# .1.3.6.1.4.1.2620.1.48.20.15.0 = STRING: "0" -# .1.3.6.1.4.1.2620.1.48.20.16.0 = STRING: "7" -# .1.3.6.1.4.1.2620.1.48.20.17.0 = STRING: "0" -# .1.3.6.1.4.1.2620.1.48.20.18.0 = STRING: "0" -# .1.3.6.1.4.1.2620.1.48.20.19.0 = STRING: "0" -# .1.3.6.1.4.1.2620.1.48.20.20.0 = STRING: "0" -# .1.3.6.1.4.1.2620.1.48.20.21.0 = STRING: "N/A" -# -# sample info -# [[u'111802', u'0', u'84', u'91', u'N/A', u'0', u'0', u'9', u'79', u'1', u'0', u'0', u'0', u'1', u'0', u'7', u'0', u'0', u'0', u'0', u'N/A']] -# - -def parse_checkpoint_asg_smo_counters(info): - items = {} - for entry in info: - asgThroughput, asgConnectionRate, asgPacketRate, asgConcurrConn, asgClearConn, asgAccelConnectionRate, \ - asgNonAccelConnectionRate, asgAccelConcurrConn, asgNonAccelConcurrConn, asgLoad, asgAccelLoadAvg, \ - asgAccelLoadMin, asgAccelLoadMax, asgInstancesLoadAvg, asgInstancesLoadMin, asgInstancesLoadMax, \ - asgVpnThroughput, asgVpnConn, asgNatConnRate, asgNatConn, asgVsxCpu1MinAvg = entry - - items.update({'Concurrent connections': { - 'asgConcurrConn': int(asgConcurrConn), - 'asgAccelConcurrConn': int(asgAccelConcurrConn), - 'asgNonAccelConcurrConn': int(asgNonAccelConcurrConn), - } - }) - items.update({'Connection rate': {'asgConnectionRate': int(asgConnectionRate), - 'asgAccelConnectionRate': int(asgAccelConnectionRate), - 'asgNonAccelConnectionRate': int(asgNonAccelConnectionRate), - } - }) - items.update({'Load': {'asgLoad': int(asgLoad), - 'asgAccelLoadAvg': int(asgAccelLoadAvg), - 'asgAccelLoadMin': int(asgAccelLoadMin), - 'asgAccelLoadMax': int(asgAccelLoadMax), - }}) - items.update({'Instances load': {'asgInstancesLoadAvg': int(asgInstancesLoadAvg), - 'asgInstancesLoadMin': int(asgInstancesLoadMin), - 'asgInstancesLoadMax': int(asgInstancesLoadMax), - }}) - items.update({'NAT': {'asgNatConnRate': int(asgNatConnRate), - 'asgNatConn': int(asgNatConn), - }}) - items.update({'VPN': {'asgVpnThroughput': int(asgVpnThroughput), - 'asgVpnConn': int(asgVpnConn), - }}) - items.update({'Throughput': {'asgThroughput': int(asgThroughput), - }}) - items.update({'Packet rate': {'asgPacketRate': int(asgPacketRate), - }}) - return items - - -def inventory_checkpoint_asg_smo_counters(parsed): - # sample parsed - # { - # 'Load': {'asgAccelLoadAvg': 0, 'asgAccelLoadMin': 0, 'asgLoad': 1, 'asgAccelLoadMax': 0}, - # 'Connection rate': {'asgConnectionRate': 0, 'asgNonAccelConnectionRate': 0, 'asgAccelConnectionRate': 0}, - # 'Instances load': {'asgInstancesLoadMin': 0, 'asgInstancesLoadMax': 7, 'asgInstancesLoadAvg': 1}, - # 'Throughput': {'asgThroughput': 111802}, - # 'Concurrent connections': {'asgAccelConcurrConn': 9, 'asgNonAccelConcurrConn': 79, 'asgConcurrConn': 91}, - # 'NAT': {'asgNatConn': 0, 'asgNatConnRate': 0}, - # 'VPN': {'asgVpnConn': 0, 'asgVpnThroughput': 0}, - # 'Packet rate': {'asgPacketRate': 84}} - # - - for item in parsed.keys(): - yield item, None - - -def check_checkpoint_asg_smo_counters(item, params, parsed): - try: - entry = parsed[item] - - perfdata = [] - infotext = '' - longoutput = '' - - if params: - pass - - for key in entry.keys(): - perfdata.append((key, entry[key], None, None, None, None)) - - if item.lower() == 'concurrent connections': - infotext = 'all/accelerated/non accelerated: %d/%d/%d' % (entry['asgConcurrConn'], entry['asgAccelConcurrConn'], entry['asgNonAccelConcurrConn'], ) - - elif item.lower() == 'load': - infotext = 'current/average/min/max: %d/%d/%d/%d' % (entry['asgLoad'], entry['asgAccelLoadAvg'], entry['asgAccelLoadMin'], entry['asgAccelLoadMax'],) - - elif item.lower() == 'connection rate': - infotext = 'all/accelerated/non accelerated: %d/%d/%d' % (entry['asgConnectionRate'], entry['asgAccelConnectionRate'], entry['asgNonAccelConnectionRate'],) - - elif item.lower() == 'instances load': - infotext = 'average/min/max: %d/%d/%d' % (entry['asgInstancesLoadAvg'], entry['asgInstancesLoadMin'], entry['asgInstancesLoadMax'],) - - elif item.lower() == 'throughput': - infotext = 'Throughput: %d' % (entry['asgThroughput']) - - elif item.lower() == 'packet rate': - infotext = 'Packet Rate: %d' % (entry['asgPacketRate'],) - - elif item.lower() == 'nat': - infotext = 'NAT Connections/NAT connection rate: %d/%d' % (entry['asgNatConn'], entry['asgNatConn'],) - - elif item.lower() == 'vpn': - infotext = 'VPN Connections/VPN Throughput: %d/%d' % (entry['asgVpnConn'], entry['asgVpnThroughput'],) - - yield 0, infotext + longoutput, perfdata - - except KeyError: - pass - - -check_info['checkpoint_asg_smo_counters'] = { - 'check_function': check_checkpoint_asg_smo_counters, - 'inventory_function': inventory_checkpoint_asg_smo_counters, - 'service_description': "ASG SMO counters %s", - 'snmp_scan_function': scan_checkpoint, - 'parse_function': parse_checkpoint_asg_smo_counters, - 'group': 'checkpoint_asg_smo_counters', - 'has_perfdata': True, - 'snmp_info': ( - '.1.3.6.1.4.1.2620.1.48.20', # CHECKPOINT-MIB::asgIPv4PerformanceCounters - [ - '1', # asgThroughput - '2', # asgConnectionRate - '3', # asgPacketRate - '4', # asgConcurrConn - '5', # asgClearConn - '6', # asgAccelConnectionRate - '7', # asgNonAccelConnectionRate - '8', # asgAccelConcurrConn - '9', # asgNonAccelConcurrConn - '10', # asgLoad - '11', # asgAccelLoadAvg - '12', # asgAccelLoadMin - '13', # asgAccelLoadMax - '14', # asgInstancesLoadAvg - '15', # asgInstancesLoadMin - '16', # asgInstancesLoadMax - '17', # asgVpnThroughput - '18', # asgVpnConn - '19', # asgNatConnRate - '20', # asgNatConn - '21', # asgVsxCpu1MinAvg - ]), - 'includes': ['checkpoint.include'], -} -- GitLab