From f8b610c120ab6819de14e8c708ba662d42bda9b9 Mon Sep 17 00:00:00 2001
From: thl-cmk <thl-cmk@outlook.com>
Date: Mon, 14 Jun 2021 19:18:58 +0000
Subject: [PATCH] Delete checkpoint_fwm_ls

---
 checks/checkpoint_fwm_ls | 246 ---------------------------------------
 1 file changed, 246 deletions(-)
 delete mode 100644 checks/checkpoint_fwm_ls

diff --git a/checks/checkpoint_fwm_ls b/checks/checkpoint_fwm_ls
deleted file mode 100644
index 83e158d..0000000
--- a/checks/checkpoint_fwm_ls
+++ /dev/null
@@ -1,246 +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
-#
-# 29.07.2016 :  monitor Check Point FWM log server status
-# 08.05.2018 :  changed snmp scan and inventory function
-# 16.03.2018 :  added R80.10 MIBs
-# 30.05.2018 :  removed empty OIDs CHECKPOINT-MIB::lsConnectedClientsEntry,
-#                                  CHECKPOINT-MIB::lsConnectedGatewaysEntry
-#                                  CHECKPOINT-MIB::lsLoggingInfo
-# 08.06.2020 : changed snmp-scan function
-#
-
-#
-# sample snmpwalk (R77.30)
-#
-# .1.3.6.1.4.1.2620.1.11.1.0 = STRING: "Check Point Log Server"
-# .1.3.6.1.4.1.2620.1.11.2.0 = INTEGER: 6
-# .1.3.6.1.4.1.2620.1.11.3.0 = INTEGER: 0
-# .1.3.6.1.4.1.2620.1.11.4.0 = INTEGER: 4663
-# .1.3.6.1.4.1.2620.1.11.5.0 = INTEGER: 1
-# .1.3.6.1.4.1.2620.1.11.101.0 = INTEGER: 0
-# .1.3.6.1.4.1.2620.1.11.102.0 = STRING: "OK"
-# .1.3.6.1.4.1.2620.1.11.103.0 = STRING: "OK"
-#
-# CHECKPOINT-MIB::lsProdName.0 = STRING: Check Point Log Server
-# CHECKPOINT-MIB::lsVerMajor.0 = INTEGER: 6
-# CHECKPOINT-MIB::lsVerMinor.0 = INTEGER: 0
-# CHECKPOINT-MIB::lsBuildNumber.0 = INTEGER: 4663
-# CHECKPOINT-MIB::lsFwmIsAlive.0 = INTEGER: 1
-# CHECKPOINT-MIB::lsStatCode.0 = INTEGER: 0
-# CHECKPOINT-MIB::lsStatShortDescr.0 = STRING: OK
-# CHECKPOINT-MIB::lsStatLongDescr.0 = STRING: OK
-#
-# sample snmpwalk (R80.10, SmartEvent Server)
-#
-# .1.3.6.1.4.1.2620.1.11.1.0 = STRING: "Check Point Log Server"
-# .1.3.6.1.4.1.2620.1.11.2.0 = INTEGER: 6
-# .1.3.6.1.4.1.2620.1.11.3.0 = INTEGER: 0
-# .1.3.6.1.4.1.2620.1.11.4.0 = INTEGER: 39081
-# .1.3.6.1.4.1.2620.1.11.5.0 = INTEGER: 1
-# .1.3.6.1.4.1.2620.1.11.14.1.0 = Gauge32: 0
-# .1.3.6.1.4.1.2620.1.11.14.2.0 = Gauge32: 1
-# .1.3.6.1.4.1.2620.1.11.14.3.0 = Gauge32: 0
-# .1.3.6.1.4.1.2620.1.11.14.4.1.1.1.0 = Gauge32: 1
-# .1.3.6.1.4.1.2620.1.11.14.4.1.2.1.0 = STRING: "Local Clients"
-# .1.3.6.1.4.1.2620.1.11.14.4.1.3.1.0 = STRING: "Connected"
-# .1.3.6.1.4.1.2620.1.11.14.4.1.4.1.0 = STRING: "N/A"
-# .1.3.6.1.4.1.2620.1.11.14.4.1.5.1.0 = Gauge32: 0
-# .1.3.6.1.4.1.2620.1.11.14.5.1.0 = STRING: "20171"
-# .1.3.6.1.4.1.2620.1.11.14.5.2.0 = STRING: "2607010"
-# .1.3.6.1.4.1.2620.1.11.14.5.3.0 = STRING: "0"
-# .1.3.6.1.4.1.2620.1.11.14.5.4.0 = STRING: "9021"
-# .1.3.6.1.4.1.2620.1.11.14.5.5.0 = Gauge32: 4
-# .1.3.6.1.4.1.2620.1.11.14.5.6.0 = Gauge32: 0
-# .1.3.6.1.4.1.2620.1.11.14.5.7.0 = Gauge32: 10
-# .1.3.6.1.4.1.2620.1.11.14.5.8.0 = Gauge32: 1
-# .1.3.6.1.4.1.2620.1.11.14.5.9.0 = Gauge32: 10
-# .1.3.6.1.4.1.2620.1.11.14.5.10.0 = Gauge32: 1
-# .1.3.6.1.4.1.2620.1.11.14.5.11.0 = Gauge32: 27275
-# .1.3.6.1.4.1.2620.1.11.14.5.12.0 = Gauge32: 1001
-# .1.3.6.1.4.1.2620.1.11.14.5.13.0 = Gauge32: 0
-# .1.3.6.1.4.1.2620.1.11.14.6.0 = Gauge32: 0
-# .1.3.6.1.4.1.2620.1.11.101.0 = INTEGER: 0
-# .1.3.6.1.4.1.2620.1.11.102.0 = STRING: "OK"
-# .1.3.6.1.4.1.2620.1.11.103.0 = STRING: "OK"
-#
-# CHECKPOINT-MIB::lsProdName.0 = STRING: Check Point Log Server
-# CHECKPOINT-MIB::lsVerMajor.0 = INTEGER: 6
-# CHECKPOINT-MIB::lsVerMinor.0 = INTEGER: 0
-# CHECKPOINT-MIB::lsBuildNumber.0 = INTEGER: 39081
-# CHECKPOINT-MIB::lsFwmIsAlive.0 = INTEGER: 1
-# CHECKPOINT-MIB::lsLogReceiveRate.0 = Gauge32: 0
-# CHECKPOINT-MIB::lsLogReceiveRatePeak.0 = Gauge32: 1
-# CHECKPOINT-MIB::lsLogReceiveRate10Min.0 = Gauge32: 0
-# CHECKPOINT-MIB::lsGWIndex.1.0 = Gauge32: 1
-# CHECKPOINT-MIB::lsGWIP.1.0 = STRING: Local Clients
-# CHECKPOINT-MIB::lsGWState.1.0 = STRING: Connected
-# CHECKPOINT-MIB::lsGWLastLoginTime.1.0 = STRING: N/A
-# CHECKPOINT-MIB::lsGWLogReceiveRate.1.0 = Gauge32: 0
-# CHECKPOINT-MIB::lsIndexerInfoTotalReadLogs.0 = Wrong Type (should be Gauge32 or Unsigned32): STRING: "20171"
-# CHECKPOINT-MIB::lsIndexerInfoTotalUpdatesAndLogsIndexed.0 = Wrong Type (should be Gauge32 or Unsigned32): STRING: "2607010"
-# CHECKPOINT-MIB::lsIndexerInfoTotalReadLogsErrors.0 = Wrong Type (should be Gauge32 or Unsigned32): STRING: "0"
-# CHECKPOINT-MIB::lsIndexerInfoTotalUpdatesAndLogsIndexedErrors.0 = Wrong Type (should be Gauge32 or Unsigned32): STRING: "9021"
-# CHECKPOINT-MIB::lsIndexerInfoUpdatesAndLogsIndexedRate.0 = Gauge32: 4
-# CHECKPOINT-MIB::lsIndexerInfoReadLogsRate.0 = Gauge32: 0
-# CHECKPOINT-MIB::lsIndexerInfoUpdatesAndLogsIndexedRatePeak.0 = Gauge32: 10
-# CHECKPOINT-MIB::lsIndexerInfoReadLogsRatePeak.0 = Gauge32: 1
-# CHECKPOINT-MIB::lsIndexerInfo.9.0 = Gauge32: 10
-# CHECKPOINT-MIB::lsIndexerInfo.10.0 = Gauge32: 1
-# CHECKPOINT-MIB::lsIndexerInfo.11.0 = Gauge32: 27275
-# CHECKPOINT-MIB::lsIndexerInfo.12.0 = Gauge32: 1001
-# CHECKPOINT-MIB::lsIndexerInfo.13.0 = Gauge32: 0
-# CHECKPOINT-MIB::lsLogReceiveRate1Hour.0 = Gauge32: 0
-# CHECKPOINT-MIB::lsStatCode.0 = INTEGER: 0
-# CHECKPOINT-MIB::lsStatShortDescr.0 = STRING: OK
-# CHECKPOINT-MIB::lsStatLongDescr.0 = STRING: OK
-#
-# R80.10 MD Logserver
-# .1.3.6.1.4.1.2620.1.11.1.0 = STRING: "Check Point Log Server"
-# .1.3.6.1.4.1.2620.1.11.2.0 = INTEGER: 6
-# .1.3.6.1.4.1.2620.1.11.3.0 = INTEGER: 0
-# .1.3.6.1.4.1.2620.1.11.4.0 = INTEGER: 39081
-# .1.3.6.1.4.1.2620.1.11.5.0 = INTEGER: 0
-# .1.3.6.1.4.1.2620.1.11.14.1.0 = Gauge32: 0
-# .1.3.6.1.4.1.2620.1.11.14.2.0 = Gauge32: 1
-# .1.3.6.1.4.1.2620.1.11.14.3.0 = Gauge32: 0
-# .1.3.6.1.4.1.2620.1.11.14.4.1.1.1.0 = Gauge32: 1
-# .1.3.6.1.4.1.2620.1.11.14.4.1.2.1.0 = STRING: "Local Clients"
-# .1.3.6.1.4.1.2620.1.11.14.4.1.3.1.0 = STRING: "Connected"
-# .1.3.6.1.4.1.2620.1.11.14.4.1.4.1.0 = STRING: "N/A"
-# .1.3.6.1.4.1.2620.1.11.14.4.1.5.1.0 = Gauge32: 0
-# .1.3.6.1.4.1.2620.1.11.14.5.1.0 = STRING: "94"
-# .1.3.6.1.4.1.2620.1.11.14.5.2.0 = STRING: "94"
-# .1.3.6.1.4.1.2620.1.11.14.5.3.0 = STRING: "0"
-# .1.3.6.1.4.1.2620.1.11.14.5.4.0 = STRING: "53"
-# .1.3.6.1.4.1.2620.1.11.14.5.5.0 = Gauge32: 0
-# .1.3.6.1.4.1.2620.1.11.14.5.6.0 = Gauge32: 0
-# .1.3.6.1.4.1.2620.1.11.14.5.7.0 = Gauge32: 1
-# .1.3.6.1.4.1.2620.1.11.14.5.8.0 = Gauge32: 1
-# .1.3.6.1.4.1.2620.1.11.14.5.9.0 = Gauge32: 1
-# .1.3.6.1.4.1.2620.1.11.14.5.10.0 = Gauge32: 1
-# .1.3.6.1.4.1.2620.1.11.14.5.11.0 = Gauge32: 2
-# .1.3.6.1.4.1.2620.1.11.14.5.12.0 = Gauge32: 2
-# .1.3.6.1.4.1.2620.1.11.14.5.13.0 = Gauge32: 0
-# .1.3.6.1.4.1.2620.1.11.14.6.0 = Gauge32: 0
-# .1.3.6.1.4.1.2620.1.11.101.0 = INTEGER: 2
-# .1.3.6.1.4.1.2620.1.11.102.0 = STRING: "Problem"
-# .1.3.6.1.4.1.2620.1.11.103.0 = STRING: "Log Server is not running"
-#
-# sample info
-# [[[u'Check Point Log Server', u'6', u'0', u'4663', u'1', u'0', u'OK', u'OK']], []]
-#
-# no logserver active
-# [[], []]
-#
-
-factory_settings['checkpoint_fwm_ls_defaults'] = {
-    'ignore_status_on_r80_10': False,
-}
-
-
-def inventory_checkpoint_fwm_ls(info):
-    try:
-        if info[0][0][0] == 'Check Point Log Server':
-            return [(None, None)]
-    except IndexError:
-        pass
-
-
-def check_checkpoint_fwm_ls(item, params, info):
-
-    longoutput = ''
-    perfdata = []
-    state = 0
-
-    r77, r80_indexer = info
-    lsprodname, lsvermajor, lsverminor, lsbuildnumber, lsfwmisalive, lsstatcode, lsstatshortdescr, lsstatlongdescr = r77[0]
-
-    infotext  = lsprodname
-    infotext += ', version: %s.%s, build: %s' % (lsvermajor, lsverminor, lsbuildnumber)
-
-    if r80_indexer:
-        TotalReadLogs, TotalUpdatesAndLogsIndexed, TotalReadLogsErrors, TotalUpdatesAndLogsIndexedErrors, \
-        UpdatesAndLogsIndexedRate, ReadLogsRate, UpdatesAndLogsIndexedRatePeak, ReadLogsRatePeak = r80_indexer[0]
-
-        perfdata.append(('totalreadlogs', int(TotalReadLogs)))
-        perfdata.append(('totalupdatesandlogsindexed', int(TotalUpdatesAndLogsIndexed)))
-        perfdata.append(('totalreadlogserrors', int(TotalReadLogsErrors)))
-        perfdata.append(('totalupdatesandlogsindexederrors', int(TotalUpdatesAndLogsIndexedErrors)))
-        perfdata.append(('updatesandlogsindexedrate', int(UpdatesAndLogsIndexedRate)))
-        perfdata.append(('updatesandlogsindexedratepeak', int(UpdatesAndLogsIndexedRatePeak)))
-        perfdata.append(('readlogsrate', int(ReadLogsRate)))
-        perfdata.append(('readlogsratepeak', int(ReadLogsRatePeak)))
-
-    if not params.get('ignore_status_on_r80_10'):
-        if int(lsfwmisalive) != 1:
-            yield 2, 'Is not alive'
-
-        if int(lsstatcode) != 0:
-            yield 2, 'Status: %s, %s' % (lsstatshortdescr, lsstatlongdescr)
-
-    yield state, infotext + longoutput, perfdata
-
-
-check_info['checkpoint_fwm_ls'] = {
-    'check_function'         : check_checkpoint_fwm_ls,
-    'inventory_function'     : inventory_checkpoint_fwm_ls,
-    'default_levels_variable': 'checkpoint_fwm_ls_defaults',
-    'service_description'    : 'FWM Log Server',
-    'group'                  : 'checkpoint_fwm_ls',
-    'has_perfdata'           : True,
-    'snmp_scan_function': lambda oid: (oid('.1.3.6.1.2.1.1.2.0').startswith('.1.3.6.1.4.1.2620.1.6.123.1') or
-                                       oid('.1.3.6.1.2.1.1.2.0').startswith('.1.3.6.1.4.1.8072.3.2.10')) and
-                                      oid('.1.3.6.1.4.1.2620.1.6.1.0', '').lower().startswith('svn foundation'),
-    'snmp_info'              : [('.1.3.6.1.4.1.2620.1.11', [  # CHECKPOINT-MIB::ls
-                                 '1',    # lsProdName
-                                 '2',    # lsVerMajor
-                                 '3',    # lsVerMinor
-                                 '4',    # lsBuildNumber
-                                 '5',    # lsFwmIsAlive
-                                 '101',  # lsStatCode
-                                 '102',  # lsStatShortDescr
-                                 '103',  # lsStatLongDescr
-                                 ]),
-                                # ('.1.3.6.1.4.1.2620.1.11.14', [  # CHECKPOINT-MIB::lsLoggingInfo
-                                #     '1',  # lsLogReceiveRate
-                                #     '2',  # lsLogReceiveRatePeak
-                                #     '3',  # lsLogReceiveRate10Min
-                                #     '6',  # lsLogReceiveRate1Hour
-                                # ]),
-                                # ('.1.3.6.1.4.1.2620.1.11.14.4.1', [  # CHECKPOINT-MIB::lsConnectedGatewaysEntry
-                                #     '1',  # lsGWIndex
-                                #     '2',  # lsGWIP
-                                #     '3',  # lsGWState
-                                #     '4',  # lsGWLastLoginTime
-                                #     '5',  # lsGWLogReceiveRate
-                                #      ]),
-                                ('.1.3.6.1.4.1.2620.1.11.14.5', [  # CHECKPOINT-MIB::lsIndexerInfo
-                                    '1',   # lsIndexerInfoTotalReadLogs
-                                    '2',   # lsIndexerInfoTotalUpdatesAndLogsIndexed
-                                    '3',   # lsIndexerInfoTotalReadLogsErrors
-                                    '4',   # lsIndexerInfoTotalUpdatesAndLogsIndexedErrors
-                                    '5',   # lsIndexerInfoUpdatesAndLogsIndexedRate
-                                    '6',   # lsIndexerInfoReadLogsRate
-                                    '7',   # lsIndexerInfoUpdatesAndLogsIndexedRatePeak
-                                    '8',   # lsIndexerInfoReadLogsRatePeak
-                                    # '9',   # lsIndexerInfo_9
-                                    # '10',  # lsIndexerInfo_10
-                                    # '11',  # lsIndexerInfo_11
-                                    # '12',  # lsIndexerInfo_12
-                                    # '13',  # lsIndexerInfo_13
-                                    ]),
-                                # ('.1.3.6.1.4.1.2620.1.11.14.7.1', [  # CHECKPOINT-MIB::lsConnectedClientsEntry
-                                #     '1',   # lsIndex
-                                #     '2',   # lsClientName
-                                #     '3',   # lsClientHost
-                                #     '4',   # lsClientDbLock
-                                #     '5',   # lsClientDbLock
-                                #     ]),
-                                ]
-}
\ No newline at end of file
-- 
GitLab