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

update project

parent 4686adb3
No related branches found
No related tags found
No related merge requests found
No preview for this file type
......@@ -9,7 +9,6 @@
#
# monitor check point remote access vpn connections
#
# OMD[mysite]:~/local/share/check_mk/checks$ snmpbulkwalk -v2c -c public -m CHECKPOINT-MIB 192.168.10.150:161 .1.3.6.1.4.1.2620.1.9
# CHECKPOINT-MIB::dtpsProdName.0 = STRING:
# CHECKPOINT-MIB::dtpsVerMajor.0 = INTEGER: 0
# CHECKPOINT-MIB::dtpsVerMinor.0 = INTEGER: 0
......@@ -19,7 +18,6 @@
# CHECKPOINT-MIB::dtpsStatShortDescr.0 = STRING: Down
# CHECKPOINT-MIB::dtpsStatLongDescr.0 = STRING: Policy Server is down
#
# OMD[mysite]:~/local/share/check_mk/checks$ snmpbulkwalk -v2c -c public -ObentU 192.168.10.150:161 .1.3.6.1.4.1.2620.1.9
# .1.3.6.1.4.1.2620.1.9.1.0 = ""
# .1.3.6.1.4.1.2620.1.9.2.0 = INTEGER: 0
# .1.3.6.1.4.1.2620.1.9.3.0 = INTEGER: 0
......@@ -29,9 +27,11 @@
# .1.3.6.1.4.1.2620.1.9.102.0 = STRING: "Down"
# .1.3.6.1.4.1.2620.1.9.103.0 = STRING: "Policy Server is down"
#
# info with policy server down and no remote access connections
# info with no policy server down and no remote access connections
# [[], [[u'', u'0', u'0', u'0', u'0', u'2', u'Down', u'Policy Server is down']]]
#
# policy server activated/up no RA users
# [[], [[u'Policy Server', u'6', u'0', u'4294967294', u'0', u'0', u'OK', u'Policy Server is up']]]
#
# raUserState OBJECT-TYPE
# SYNTAX INTEGER {
......@@ -65,7 +65,6 @@
# crack(130)
# }
#
# OMD[mysite]:~$ snmpbulkwalk -v2c -c public -m CHECKPOINT-MIB 192.168.10.150:161 .1.3.6.1.4.1.2620.500.9000
# CHECKPOINT-MIB::raUsersEntry.2.172.16.1.1.0 = STRING: "tabu"
# CHECKPOINT-MIB::raUsersEntry.2.172.16.1.2.0 = STRING: "dhai"
# CHECKPOINT-MIB::raUsersEntry.2.172.16.1.5.0 = STRING: "PhiS"
......@@ -106,7 +105,6 @@
# CHECKPOINT-MIB::raUsersEntry.30.172.16.1.2.0 = Gauge32: 8
# CHECKPOINT-MIB::raUsersEntry.30.172.16.1.5.0 = Gauge32: 8
#
# OMD[mysite]:~$ snmpbulkwalk -v2c -c public -ObentU 192.168.10.150:161 .1.3.6.1.4.1.2620.500.9000
# .1.3.6.1.4.1.2620.500.9000.1.2.172.16.1.1.0 = STRING: "tabu"
# .1.3.6.1.4.1.2620.500.9000.1.2.172.16.1.2.0 = STRING: "dhai"
# .1.3.6.1.4.1.2620.500.9000.1.2.172.16.1.5.0 = STRING: "PhiS"
......@@ -159,11 +157,14 @@ checkpoint_remoteaccess_default_levels = (40, 100)
def inventory_checkpoint_remoteaccess(info):
if len(info) >= 1 and len(info[1]) >= 1: # policy server found
return [(None, 'checkpoint_remoteaccess_default_levels')]
try:
if info[1][0][0] == 'Policy Server':
return [(None, 'checkpoint_remoteaccess_default_levels')]
except IndexError:
pass
def check_checkpoint_remoteaccess(item, params, info):
def check_checkpoint_remoteaccess(_no_item, params, info):
raUsersTable, dtps = info
# print dtps[0]
......@@ -251,7 +252,6 @@ def check_checkpoint_remoteaccess(item, params, info):
('raUsersRouteTraffic', raUsersRouteTraffic),
]
state = 0
longoutput = ''
infotext = ''
if dtpsVerMajor == 0:
......@@ -275,8 +275,7 @@ def check_checkpoint_remoteaccess(item, params, info):
if raBadEncryption > 0:
yield 1, 'User with bad encryption (DES, 3DES, CAST, 3IDEA, NULL)'
yield state, infotext + longoutput, perfdata
yield 0, infotext + longoutput, perfdata
check_info['checkpoint_remoteaccess'] = {
......@@ -286,8 +285,8 @@ check_info['checkpoint_remoteaccess'] = {
'has_perfdata' : True,
# 'group' : 'checkpoint_remoteaccess',
'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') in ['.1.3.6.1.4.1.8072.3.2.10',]) # Virtual System (Linux)
and oid('.1.3.6.1.4.1.2620.1.1.26.11.1.0'), # CHECKPOINT-MIB::fwConnectionsStatConnectionsTcp.0
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.500.9000', [
OID_END,
'1.2', # UserName
......
......@@ -6,6 +6,6 @@
'name': 'checkpoint_remoteaccess',
'num_files': 2,
'title': u'Check Point remote access',
'version': '20190822.v.0.0.1',
'version': '20200608.v.0.0.1a',
'version.min_required': '1.2.8b8',
'version.packaged': '1.4.0p38'}
\ No newline at end of file
#!/usr/bin/python
# -*- encoding: utf-8; py-indent-offset: 4 -*-
#
# Check Point Policy Server connections metrics plugins
# checkpoint_remoteaccess
# License: GNU General Public License v2
#
# Author: Th.L.
# Author: thl-cmk[at]outlook[dot]com
# URL : https://thl-cmk.hopto.org
# Date : 2019-08-19
#
# Check Point Policy Server connections metrics plugins
# checkpoint_remoteaccess
#
#####################################################################################################################
##############################################################################
#
# define units for perfdata
#
#####################################################################################################################
##############################################################################
#####################################################################################################################
##############################################################################
#
# define metrics for perfdata
#
#####################################################################################################################
##############################################################################
metric_info['checkpoint_remoteaccess_dtpsConnectedUsers'] = {
'title': _('Dtps Connected users'),
'title': _('DTPS Connected users'),
'unit': 'count',
'color': '11/a',
}
......@@ -69,11 +71,11 @@ metric_info['checkpoint_remoteaccess_raBadEncryption'] = {
'unit': 'count',
'color': '22/a',
}
######################################################################################################################
##############################################################################
#
# map perfdata to metric
#
######################################################################################################################
##############################################################################
check_metrics['check_mk-checkpoint_remoteaccess'] = {
'dtpsConnectedUsers': {'name': 'checkpoint_remoteaccess_dtpsConnectedUsers', },
......@@ -87,11 +89,11 @@ check_metrics['check_mk-checkpoint_remoteaccess'] = {
'raBadEncryption': {'name': 'checkpoint_remoteaccess_raBadEncryption', },
}
######################################################################################################################
##############################################################################
#
# how to graph perdata
#
######################################################################################################################
##############################################################################
graph_info.append({
'title': _('Check Point Remote Access Users'),
......@@ -120,11 +122,11 @@ graph_info.append({
})
######################################################################################################################
##############################################################################
#
# define perf-o-meter
#
######################################################################################################################
##############################################################################
# perfometer_info.append(('stacked', [
......
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