From e804b23ccbb35d2667ea3d18560eb64a060f4bfb Mon Sep 17 00:00:00 2001
From: "th.l" <thl-cmk@outlook.com>
Date: Wed, 29 Sep 2021 17:00:46 +0200
Subject: [PATCH] update project

---
 agent_based/checkpoint_asg_sg_counters.py     | 227 ++++++++++++++
 checkpoint_asg_sg_counters.mkp                | Bin 0 -> 3396 bytes
 packages/checkpoint_asg_sg_counters           |  12 +
 .../metrics/checkpoint_asg_sg_counters.py     | 288 ++++++++++++++++++
 4 files changed, 527 insertions(+)
 create mode 100644 agent_based/checkpoint_asg_sg_counters.py
 create mode 100644 checkpoint_asg_sg_counters.mkp
 create mode 100644 packages/checkpoint_asg_sg_counters
 create mode 100644 web/plugins/metrics/checkpoint_asg_sg_counters.py

diff --git a/agent_based/checkpoint_asg_sg_counters.py b/agent_based/checkpoint_asg_sg_counters.py
new file mode 100644
index 0000000..ff9b56d
--- /dev/null
+++ b/agent_based/checkpoint_asg_sg_counters.py
@@ -0,0 +1,227 @@
+#!/usr/bin/env python3
+# -*- coding: utf-8 -*-
+#
+# 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 SG Counters
+#
+# 2021-09-10: rewritten for CMK 2.0
+# 2021-09-11: added metrics file
+# 2021-09-29: renamed from checkpoint_asg_smo_counters to checkpoint_asg_sg_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 string_table
+# [
+#  [
+#   '111802', '0', '84', '91', 'N/A', '0', '0', '9', '79', '1', '0', '0', '0', '1', '0', '7', '0', '0', '0', '0', 'N/A'
+#  ]
+# ]
+#
+
+from dataclasses import dataclass
+from typing import Dict
+
+from cmk.base.plugins.agent_based.agent_based_api.v1 import (
+    register,
+    Service,
+    Result,
+    Metric,
+    State,
+    SNMPTree,
+    all_of,
+    startswith,
+    any_of,
+    equals,
+)
+from cmk.base.plugins.agent_based.agent_based_api.v1.type_defs import (
+    DiscoveryResult,
+    CheckResult,
+    StringTable,
+)
+
+
+@dataclass
+class CheckpointAsgSgCounters:
+    counters: Dict[str, int]
+    label: str
+    unit: str
+    text: str
+
+
+def parse_checkpoint_asg_sg_counters(string_table: StringTable) -> Dict[str, CheckpointAsgSgCounters]:
+    items = {}
+    for entry in string_table:
+        asgThroughput, asgConnectionRate, asgPacketRate, asgConcurrConn, asgClearConn, asgAccelConnectionRate, \
+        asgNonAccelConnectionRate, asgAccelConcurrConn, asgNonAccelConcurrConn, asgLoad, asgAccelLoadAvg, \
+        asgAccelLoadMin, asgAccelLoadMax, asgInstancesLoadAvg, asgInstancesLoadMin, asgInstancesLoadMax, \
+        asgVpnThroughput, asgVpnConn, asgNatConnRate, asgNatConn, asgVsxCpu1MinAvg = entry
+
+        items['Concurrent connections'] = CheckpointAsgSgCounters(
+            counters={
+                'concurr_conn': int(asgConcurrConn),
+                'accel_concurr_conn': int(asgAccelConcurrConn),
+                'non_accel_concurr_conn': int(asgNonAccelConcurrConn),
+            },
+            label='all/accelerated/non accelerated',
+            unit=' connections',
+            text=f'{int(asgConcurrConn):d}/{int(asgAccelConcurrConn):d}/{int(asgNonAccelConcurrConn):d}',
+        )
+        items['Connection rate'] = CheckpointAsgSgCounters(
+            counters={
+                'connection_rate': int(asgConnectionRate),
+                'accel_connection_rate': int(asgAccelConnectionRate),
+                'non_accel_connection_rate': int(asgNonAccelConnectionRate),
+            },
+            label='current/average/min/max',
+            unit=' connections/s',
+            text=f'{int(asgLoad):d}/{int(asgAccelLoadAvg):d}/{int(asgAccelLoadMin):d}/{int(asgAccelLoadMax):d}',
+        )
+        items['Load'] = CheckpointAsgSgCounters(
+            counters={
+                'load': int(asgLoad),
+                'accel_load_avg': int(asgAccelLoadAvg),
+                'accel_load_min': int(asgAccelLoadMin),
+                'accel_load_max': int(asgAccelLoadMax),
+            },
+            label='current/average/min/max',
+            unit='%',
+            text=f'{int(asgLoad):d}/{int(asgAccelLoadAvg):d}/{int(asgAccelLoadMin):d}/{int(asgAccelLoadMax):d}',
+        )
+        items['Instances load'] = CheckpointAsgSgCounters(
+            counters={
+                'instances_load_avg': int(asgInstancesLoadAvg),
+                'instances_load_min': int(asgInstancesLoadMin),
+                'instances_load_max': int(asgInstancesLoadMax),
+            },
+            label='average/min/max',
+            unit='%',
+            text=f'{int(asgInstancesLoadAvg):d}/{int(asgInstancesLoadMin):d}/{int(asgInstancesLoadMax):d}',
+        )
+        items['NAT'] = CheckpointAsgSgCounters(
+            counters={
+                'nat_conn_rate': int(asgNatConnRate),
+                'nat_conn': int(asgNatConn),
+            },
+            label='NAT Connections/NAT connection rate',
+            unit=' connections',
+            text=f'{int(asgNatConn):d}/{int(asgNatConn):d}',
+        )
+        items['VPN'] = CheckpointAsgSgCounters(
+            counters={
+                'vpn_throughput': int(asgVpnThroughput),
+                'vpn_conn': int(asgVpnConn),
+            },
+            label='VPN Connections/VPN Throughput',
+            unit='',
+            text=f'{int(asgVpnConn):d}/{int(asgVpnThroughput):d}',
+        )
+        items['Throughput'] = CheckpointAsgSgCounters(
+            counters={
+                'throughput': int(asgThroughput),
+            },
+            label='Throughput',
+            unit=' Bytes/s',
+            text=f'{int(asgThroughput):d}'
+        )
+        items['Packet rate'] = CheckpointAsgSgCounters(
+            counters={
+                'packet_rate': int(asgPacketRate),
+            },
+            label='Packet Rate',
+            unit=' Packets/s',
+            text=f'{int(asgPacketRate):d}',
+        )
+    if items:
+        return items
+
+
+def discovery_checkpoint_asg_sg_counters(section:Dict[str, CheckpointAsgSgCounters]) -> DiscoveryResult:
+    for item in section.keys():
+        yield Service(item=item)
+
+
+def check_checkpoint_asg_sg_counters(item, params, section: Dict[str, CheckpointAsgSgCounters]) -> CheckResult:
+    try:
+        entry = section[item]
+    except KeyError:
+        yield Result(state=State.UNKNOWN, notice='Item not found in SNMP data')
+        return
+
+    for key in entry.counters.keys():
+        yield Metric(value=entry.counters[key], name=f'checkpoint_asg_sg_counters_{key}')
+
+    yield Result(state=State.OK, summary=f'{entry.label}: {entry.text}{entry.unit}')
+
+
+register.snmp_section(
+    name='checkpoint_asg_sg_counters',
+    parse_function=parse_checkpoint_asg_sg_counters,
+    fetch=SNMPTree(
+        base='.1.3.6.1.4.1.2620.1.48.20',  # CHECKPOINT-MIB::asgIPv4PerformanceCounters
+        oids=[
+            '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
+        ]
+    ),
+    detect=any_of(
+        startswith('.1.3.6.1.2.1.1.2.0', '.1.3.6.1.4.1.2620'),
+        all_of(
+            equals('.1.3.6.1.2.1.1.2.0', '.1.3.6.1.4.1.8072.3.2.10'),
+            equals('.1.3.6.1.4.1.2620.1.6.1.0', 'SVN Foundation'),
+        )
+    )
+)
+
+register.check_plugin(
+    name='checkpoint_asg_sg_counters',
+    service_name='ASG SG counters %s',
+    discovery_function=discovery_checkpoint_asg_sg_counters,
+    check_function=check_checkpoint_asg_sg_counters,
+    check_ruleset_name='checkpoint_asg_sg_counters',
+    check_default_parameters={},
+)
diff --git a/checkpoint_asg_sg_counters.mkp b/checkpoint_asg_sg_counters.mkp
new file mode 100644
index 0000000000000000000000000000000000000000..8c65b71bd4a798f18bf21d1d5bb4e364287c83c0
GIT binary patch
literal 3396
zcmV-K4ZHFmiwFpwe^g-t|6^!nV{344X>N31VRL6+b7x;;Z*^{TWpZ;ZGB7eRFgY?g
zE_N_3GcIjwZ~*OGZExE+63%D;3SNqZ?1LjqvSTL(e7J17*DKn%L6i1AWCMe-X<JuW
z^64c_P~^Ygka{C!%93Iy+r85uQA}xO_;7|C4k<dOJ$DXXm^7e%ugCrZW&i40w|AiT
zbmLeX4Eo*v0o>8M-2<c@yaENDk6nPWk4Ey1`;*WQ1qc4pag`xbu9xaZ6*c{(bu?Xl
zyTSgg6Zn?ne7l)B{_WIRwUl-PDKp|tU32Z5j!mU59NY9A7o9K3^c%W#Oxs5nn0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_sg_counters
new file mode 100644
index 0000000..9bec67b
--- /dev/null
+++ b/packages/checkpoint_asg_sg_counters
@@ -0,0 +1,12 @@
+{'author': 'Th.L. (thl-cmk[at]outlook[dot]com)',
+ 'description': 'Monitor Check Point Maestro SG performance counters\n',
+ 'download_url': 'http://thl-cmk.hopto.org/',
+ 'files': {'agent_based': ['checkpoint_asg_sg_counters.py'],
+           'web': ['plugins/metrics/checkpoint_asg_sg_counters.py']},
+ 'name': 'checkpoint_asg_sg_counters',
+ 'num_files': 2,
+ 'title': 'Check Point Maestro SG performance counters',
+ 'version': '20210929.v0.3',
+ 'version.min_required': '2.0.0',
+ 'version.packaged': '2021.09.20',
+ 'version.usable_until': None}
\ No newline at end of file
diff --git a/web/plugins/metrics/checkpoint_asg_sg_counters.py b/web/plugins/metrics/checkpoint_asg_sg_counters.py
new file mode 100644
index 0000000..84014ce
--- /dev/null
+++ b/web/plugins/metrics/checkpoint_asg_sg_counters.py
@@ -0,0 +1,288 @@
+#!/usr/bin/env python3
+# -*- coding: utf-8 -*-
+#
+
+from cmk.gui.i18n import _
+
+from cmk.gui.plugins.metrics import (
+    metric_info,
+    graph_info,
+    perfometer_info,
+)
+
+metric_info['checkpoint_asg_sg_counters_concurr_conn'] = {
+    'title': _('Connections'),
+    'unit': 'count',
+    'color': '26/a',
+}
+metric_info['checkpoint_asg_sg_counters_accel_concurr_conn'] = {
+    'title': _('Connections Accelerated'),
+    'unit': 'count',
+    'color': '32/a',
+}
+metric_info['checkpoint_asg_sg_counters_non_accel_concurr_conn'] = {
+    'title': _('Connections non Accelerated'),
+    'unit': 'count',
+    'color': '16/a',
+}
+
+metric_info['checkpoint_asg_sg_counters_connection_rate'] = {
+    'title': _('Connection Rate'),
+    'unit': '1/s',
+    'color': '26/a',
+}
+metric_info['checkpoint_asg_sg_counters_accel_connection_rate'] = {
+    'title': _('Connection Rate Accelerated'),
+    'unit': '1/s',
+    'color': '32/a',
+}
+metric_info['checkpoint_asg_sg_counters_non_accel_connection_rate'] = {
+    'title': _('Connection Rate non Accelerated'),
+    'unit': '1/s',
+    'color': '16/a',
+}
+
+metric_info['checkpoint_asg_sg_counters_load'] = {
+    'title': _('Load'),
+    'unit': '%',
+    'color': '26/a',
+}
+metric_info['checkpoint_asg_sg_counters_accel_load_max'] = {
+    'title': _('Accel load (max)'),
+    'unit': '%',
+    'color': '31/a',
+}
+metric_info['checkpoint_asg_sg_counters_accel_load_avg'] = {
+    'title': _('Accel load (avg)'),
+    'unit': '%',
+    'color': '16/a',
+}
+metric_info['checkpoint_asg_sg_counters_accel_load_min'] = {
+    'title': _('Accel load (min)'),
+    'unit': '%',
+    'color': '11/a',
+}
+
+metric_info['checkpoint_asg_sg_counters_instances_load_avg'] = {
+    'title': _('Instances load (avg)'),
+    'unit': '%',
+    'color': '26/a',
+}
+metric_info['checkpoint_asg_sg_counters_instances_load_min'] = {
+    'title': _('Instances load (min)'),
+    'unit': '%',
+    'color': '32/a',
+}
+metric_info['checkpoint_asg_sg_counters_instances_load_max'] = {
+    'title': _('Instances load (max)'),
+    'unit': '%',
+    'color': '16/a',
+}
+
+metric_info['checkpoint_asg_sg_counters_nat_conn'] = {
+    'title': _('NAT connections'),
+    'unit': 'count',
+    'color': '26/a',
+}
+metric_info['checkpoint_asg_sg_counters_nat_conn_rate'] = {
+    'title': _('NAT Conn Rate'),
+    'unit': '1/s',
+    'color': '32/a',
+}
+
+metric_info['checkpoint_asg_sg_counters_vpn_conn'] = {
+    'title': _('VPN connections'),
+    'unit': 'count',
+    'color': '26/a',
+}
+metric_info['checkpoint_asg_sg_counters_vpn_throughput'] = {
+    'title': _('VPN Throughput'),
+    'unit': 'bytes/s',
+    'color': '32/a',
+}
+
+metric_info['checkpoint_asg_sg_counters_throughput'] = {
+    'title': _('Throughput'),
+    'unit': 'bytes/s',
+    'color': '26/a',
+}
+
+metric_info['checkpoint_asg_sg_counters_packet_rate'] = {
+    'title': _('Packet Rate'),
+    'unit': '1/s',
+    'color': '26/a',
+}
+
+graph_info['checkpoint_asg_sg_counters_connections'] = {
+    'title': _('Check Point SG Concurrent Connections'),
+    'metrics': [
+        ('checkpoint_asg_sg_counters_non_accel_concurr_conn', 'line'),
+        ('checkpoint_asg_sg_counters_accel_concurr_conn', 'line'),
+        ('checkpoint_asg_sg_counters_concurr_conn', 'area'),
+    ],
+    'range': (0, 'checkpoint_asg_sg_counters_concurr_conn:max'),
+}
+
+graph_info['checkpoint_asg_sg_counters_connection_rate'] = {
+    'title': _('Check Point SG Counter Connection Rate'),
+    'metrics': [
+        ('checkpoint_asg_sg_counters_non_accel_connection_rate', 'line'),
+        ('checkpoint_asg_sg_counters_accel_connection_rate', 'line'),
+        ('checkpoint_asg_sg_counters_connection_rate', 'area'),
+    ],
+    'range': (0, 'checkpoint_asg_sg_counters_connection_rate:max'),
+}
+
+graph_info['checkpoint_asg_sg_counters_accel_load'] = {
+    'title': _('Check Point SG Counter Load'),
+    'metrics': [
+        ('checkpoint_asg_sg_counters_accel_load_min', 'line'),
+        ('checkpoint_asg_sg_counters_accel_load_avg', 'line'),
+        ('checkpoint_asg_sg_counters_accel_load_max', 'line'),
+        ('checkpoint_asg_sg_counters_load', 'area'),
+    ],
+    'range': (0, 110),
+}
+
+graph_info['checkpoint_asg_sg_counters_instances_load'] = {
+    'title': _('Check Point SG Counter Instances Load'),
+    'metrics': [
+        ('checkpoint_asg_sg_counters_instances_load_min', 'line'),
+        ('checkpoint_asg_sg_counters_instances_load_avg', 'area'),
+        ('checkpoint_asg_sg_counters_instances_load_max', 'line'),
+    ],
+    'range': (0, 110),
+}
+
+graph_info['checkpoint_asg_sg_counters_nat_conn'] = {
+    'title': _('Check Point SG Counter NAT connections'),
+    'metrics': [
+        ('checkpoint_asg_sg_counters_nat_conn', 'area'),
+    ],
+    'range': (0, 'checkpoint_asg_sg_counters_nat_conn:max'),
+}
+graph_info['checkpoint_asg_sg_counters_nat_conn_rate'] = {
+    'title': _('Check Point SG Counter NAT connection rate'),
+    'metrics': [
+        ('checkpoint_asg_sg_counters_nat_conn_rate', 'area'),
+    ],
+    'range': (0, 'checkpoint_asg_sg_counters_nat_conn_rate:max'),
+}
+
+graph_info['checkpoint_asg_sg_counters_vpn_conn'] = {
+    'title': _('Check Point SG Counter VPN connections'),
+    'metrics': [
+        ('checkpoint_asg_sg_counters_vpn_conn', 'area'),
+    ],
+    'range': (0, 'checkpoint_asg_sg_counters_vpn_conn:max'),
+}
+graph_info['checkpoint_asg_sg_counters_vpn_throughput'] = {
+    'title': _('Check Point SGM Counter VPN Throughput'),
+    'metrics': [
+        ('checkpoint_asg_sg_counters_vpn_throughput', 'area'),
+    ],
+    'range': (0, 'checkpoint_asg_sg_counters_vpn_throughput:max'),
+}
+
+graph_info['checkpoint_asg_sg_counters_throughput'] = {
+    'title': _('Check Point SG Counter Throughput'),
+    'metrics': [
+        ('checkpoint_asg_sg_counters_throughput', 'area'),
+    ],
+    'range': (0, 'checkpoint_asg_sg_counters_throughput:max'),
+}
+
+graph_info['checkpoint_asg_sg_counters_packet_rate'] = {
+    'title': _('Check Point SG Counter Packet Rate'),
+    'metrics': [
+        ('checkpoint_asg_sg_counters_packet_rate', 'area'),
+    ],
+    'range': (0, 'checkpoint_asg_sg_counters_packet_rate:max'),
+}
+
+
+perfometer_info.append(('stacked', [
+    {
+        'type': 'logarithmic',
+        'metric': 'checkpoint_asg_sg_counters_accel_concurr_conn',
+        'half_value': 100000.0,
+        'exponent': 2,
+    },
+    {
+        'type': 'logarithmic',
+        'metric': 'checkpoint_asg_sg_counters_non_accel_concurr_conn',
+        'half_value': 100000.0,
+        'exponent': 2,
+    },
+]))
+
+perfometer_info.append(('stacked', [
+    {
+        'type': 'logarithmic',
+        'metric': 'checkpoint_asg_sg_counters_accel_connection_rate',
+        'half_value': 10000.0,
+        'exponent': 2,
+    },
+    {
+        'type': 'logarithmic',
+        'metric': 'checkpoint_asg_sg_counters_non_accel_connection_rate',
+        'half_value': 10000.0,
+        'exponent': 2,
+    },
+]))
+
+perfometer_info.append({
+    'type': 'linear',
+    'segments': ['checkpoint_asg_sg_counters_accel_load_avg'],
+    'total': 100,
+})
+
+perfometer_info.append({
+    'type': 'linear',
+    'segments': ['checkpoint_asg_sg_counters_instances_load_avg'],
+    'total': 100,
+})
+
+perfometer_info.append(('stacked', [
+    {
+        'type': 'logarithmic',
+        'metric': 'checkpoint_asg_sg_counters_nat_conn',
+        'half_value': 10000.0,
+        'exponent': 2,
+    },
+    {
+        'type': 'logarithmic',
+        'metric': 'checkpoint_asg_sg_counters_nat_conn_rate',
+        'half_value': 500.0,
+        'exponent': 2,
+    },
+]))
+
+perfometer_info.append(('stacked', [
+    {
+        'type': 'logarithmic',
+        'metric': 'checkpoint_asg_sg_counters_vpn_conn',
+        'half_value': 500.0,
+        'exponent': 2,
+    },
+    {
+        'type': 'logarithmic',
+        'metric': 'checkpoint_asg_sg_counters_vpn_throughput',
+        'half_value': 2592000.0,
+        'exponent': 2,
+    },
+]))
+
+perfometer_info.append({
+    'type': 'logarithmic',
+    'metric': 'checkpoint_asg_sg_counters_throughput',
+    'half_value': 500.0,
+    'exponent': 2,
+})
+
+perfometer_info.append({
+    'type': 'logarithmic',
+    'metric': 'checkpoint_asg_sg_counters_packet_rate',
+    'half_value': 100000.0,
+    'exponent': 2,
+})
-- 
GitLab