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

Delete checkpoint_identity_awareness

parent d1e81a0d
No related branches found
No related tags found
No related merge requests found
#!/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 : 2017-17-05
#
# Check Point Identity Awareness status
#
# 2018-03-15 : code cleanup, added identity counters 39-44
# 2020-06-08 : changed snmp-scan function
#
# snmpwalk sample
#
# .1.3.6.1.4.1.2620.1.38.1.0 = STRING: "Identity Awareness"
# .1.3.6.1.4.1.2620.1.38.2.0 = Gauge32: 149
# .1.3.6.1.4.1.2620.1.38.3.0 = Gauge32: 0
# .1.3.6.1.4.1.2620.1.38.4.0 = Gauge32: 0
# .1.3.6.1.4.1.2620.1.38.5.0 = Gauge32: 0
# .1.3.6.1.4.1.2620.1.38.6.0 = Gauge32: 0
# .1.3.6.1.4.1.2620.1.38.7.0 = Gauge32: 149
# .1.3.6.1.4.1.2620.1.38.8.0 = Gauge32: 188
# .1.3.6.1.4.1.2620.1.38.9.0 = Gauge32: 0
# .1.3.6.1.4.1.2620.1.38.10.0 = Gauge32: 0
# .1.3.6.1.4.1.2620.1.38.11.0 = Gauge32: 337
# .1.3.6.1.4.1.2620.1.38.12.0 = Gauge32: 0
# .1.3.6.1.4.1.2620.1.38.13.0 = Gauge32: 0
# .1.3.6.1.4.1.2620.1.38.14.0 = Gauge32: 0
# .1.3.6.1.4.1.2620.1.38.15.0 = Gauge32: 0
# .1.3.6.1.4.1.2620.1.38.16.0 = Gauge32: 221
# .1.3.6.1.4.1.2620.1.38.17.0 = Gauge32: 44
# .1.3.6.1.4.1.2620.1.38.18.0 = Gauge32: 0
# .1.3.6.1.4.1.2620.1.38.19.0 = Gauge32: 0
# .1.3.6.1.4.1.2620.1.38.20.0 = Gauge32: 0
# .1.3.6.1.4.1.2620.1.38.21.0 = Gauge32: 2272
# .1.3.6.1.4.1.2620.1.38.22.0 = Gauge32: 68786
# .1.3.6.1.4.1.2620.1.38.23.0 = Gauge32: 0
# .1.3.6.1.4.1.2620.1.38.39.0 = Gauge32: 0
# .1.3.6.1.4.1.2620.1.38.40.0 = Gauge32: 0
# .1.3.6.1.4.1.2620.1.38.41.0 = Gauge32: 0
# .1.3.6.1.4.1.2620.1.38.42.0 = Gauge32: 0
# .1.3.6.1.4.1.2620.1.38.43.0 = Gauge32: 0
# .1.3.6.1.4.1.2620.1.38.44.0 = Gauge32: 0
# .1.3.6.1.4.1.2620.1.38.101.0 = Gauge32: 0
# .1.3.6.1.4.1.2620.1.38.102.0 = STRING: "OK"
# .1.3.6.1.4.1.2620.1.38.103.0 = STRING: "OK"
#
# sample info
# [[u'Identity Awareness', u'149', u'0', u'0', u'0', u'0', u'149', u'188', u'0', u'0', u'337', u'0', u'0', u'0', u'0',
# u'221', u'44', u'0', u'0', u'0', u'2272', u'68786', u'0', u'0', u'0', u'0', u'0', u'0', u'0', u'0', u'OK', u'OK']]
#
factory_settings['checkpoint_identity_awareness_defaults'] = {
}
def inventory_checkpoint_identity_awareness(info):
return [(None, None)]
def check_checkpoint_identity_awareness(item, params, info):
infotext = ''
longoutput = ''
perfdata = []
now_time = time.time()
for ia in info:
iaProductName = ia[0]
iaAuthUsers = ia[1]
iaUnAuthUsers = ia[2]
iaAuthUsersKerberos = ia[3]
iaAuthMachKerberos = ia[4]
iaAuthUsersPass = ia[5]
iaAuthUsersADQuery = ia[6]
iaAuthMachADQuery = ia[7]
iaLoggedInAgent = ia[8]
iaLoggedInCaptivePortal = ia[9]
iaLoggedInADQuery = ia[10]
iaAntiSpoffProtection = ia[11]
iaSuccUserLoginKerberos = ia[12]
iaSuccMachLoginKerberos = ia[13]
iaSuccUserLoginPass = ia[14]
iaSuccUserLoginADQuery = ia[15]
iaSuccMachLoginADQuery = ia[16]
iaUnSuccUserLoginKerberos = ia[17]
iaUnSuccMachLoginKerberos = ia[18]
iaUnSuccUserLoginPass = ia[19]
iaSuccUserLDAP = ia[20]
iaUnSuccUserLDAP = ia[21]
iaDataTrans = ia[22]
if ia[23] != '':
iaRADIUSAccounting = ia[23]
iaIdentityCollectorActiveDirectory = ia[24]
iaIdentityCollectorCiscoISE = ia[25]
iaTerminalServer = ia[26]
iaRemoteAccess = ia[27]
iaIdentityWebAPI = ia[28]
else:
iaRADIUSAccounting = 0
iaIdentityCollectorActiveDirectory = 0
iaIdentityCollectorCiscoISE = 0
iaTerminalServer = 0
iaRemoteAccess = 0
iaIdentityWebAPI = 0
iaStatus = ia[29]
iaStatusShortDesc = ia[30]
iaStatusLongDesc = ia[31]
infotext = 'authenticated users: %s, unauthenticated guests: %s' % (iaAuthUsers, iaUnAuthUsers)
if not iaStatus == '0':
yield 1, '%s' % iaStatusLongDesc
iaSuccUserLDAP = get_rate('checkpoint_identity_awareness.%s' % 'iaSuccUserLDAP', now_time, int(iaSuccUserLDAP), onwrap=SKIP)
iaUnSuccUserLDAP = get_rate('checkpoint_identity_awareness.%s' % 'iaUnSuccUserLDAP', now_time, int(iaUnSuccUserLDAP), onwrap=SKIP)
perfdata = [
# authenticated/unauthenticated users/machines
('iaAuthUsers', int(iaAuthUsers)),
('iaAuthUsersPass', int(iaAuthUsersPass)),
('iaAuthUsersADQuery', int(iaAuthUsersADQuery)),
('iaAuthUsersKerberos', int(iaAuthUsersKerberos)),
('iaAuthMachKerberos', int(iaAuthMachKerberos)),
('iaAuthMachADQuery', int(iaAuthMachADQuery)),
('iaUnAuthUsers', int(iaUnAuthUsers)),
# logged in users with
('iaLoggedInAgent', int(iaLoggedInAgent)),
('iaLoggedInCaptivePortal', int(iaLoggedInCaptivePortal)),
('iaLoggedInADQuery', int(iaLoggedInADQuery)),
('iaRADIUSAccounting', int(iaRADIUSAccounting)),
('iaIdentityCollectorActiveDirectory', int(iaIdentityCollectorActiveDirectory)),
('iaIdentityCollectorCiscoISE', int(iaIdentityCollectorCiscoISE)),
('iaTerminalServer', int(iaTerminalServer)),
('iaRemoteAccess', int(iaRemoteAccess)),
('iaIdentityWebAPI', int(iaIdentityWebAPI)),
# successfull login attempts
('iaSuccUserLoginPass', int(iaSuccUserLoginPass)),
('iaSuccUserLoginKerberos', int(iaSuccUserLoginKerberos)),
('iaSuccUserLoginADQuery', int(iaSuccUserLoginADQuery)),
('iaSuccMachLoginKerberos', int(iaSuccMachLoginKerberos)),
('iaSuccMachLoginADQuery', int(iaSuccMachLoginADQuery)),
# unsuccessfull login attempts
('iaUnSuccUserLoginPass', int(iaUnSuccUserLoginPass)),
('iaUnSuccUserLoginKerberos', int(iaUnSuccUserLoginKerberos)),
('iaUnSuccMachLoginKerberos', int(iaUnSuccMachLoginKerberos)),
# LDAP queries
('iaSuccUserLDAP', iaSuccUserLDAP),
('iaUnSuccUserLDAP', iaUnSuccUserLDAP),
('iaAntiSpoffProtection', int(iaAntiSpoffProtection)),
('iaDataTrans', int(iaDataTrans)),
]
if params.get('ignore_counters'):
for counter in params.get('ignore_counters'):
for entry in perfdata:
if entry[0] == counter:
perfdata.remove(entry)
yield 0, infotext + longoutput, perfdata
check_info['checkpoint_identity_awareness'] = {
'check_function' : check_checkpoint_identity_awareness,
'inventory_function' : inventory_checkpoint_identity_awareness,
'service_description' : 'Identity Awareness status',
'group': 'checkpoint_identity_awareness',
'default_levels_variable': 'checkpoint_identity_awareness_defaults',
'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.38', [ # CHECKPOINT-MIB::identityAwareness
'1', # identityAwarenessProductName
'2', # identityAwarenessAuthUsers
'3', # identityAwarenessUnAuthUsers
'4', # identityAwarenessAuthUsersKerberos
'5', # identityAwarenessAuthMachKerberos
'6', # identityAwarenessAuthUsersPass
'7', # identityAwarenessAuthUsersADQuery
'8', # identityAwarenessAuthMachADQuery
'9', # identityAwarenessLoggedInAgent
'10', # identityAwarenessLoggedInCaptivePortal
'11', # identityAwarenessLoggedInADQuery
'12', # identityAwarenessAntiSpoffProtection
'13', # identityAwarenessSuccUserLoginKerberos
'14', # identityAwarenessSuccMachLoginKerberos
'15', # identityAwarenessSuccUserLoginPass
'16', # identityAwarenessSuccUserLoginADQuery
'17', # identityAwarenessSuccMachLoginADQuery
'18', # identityAwarenessUnSuccUserLoginKerberos
'19', # identityAwarenessUnSuccMachLoginKerberos
'20', # identityAwarenessUnSuccUserLoginPass
'21', # identityAwarenessSuccUserLDAP
'22', # identityAwarenessUnSuccUserLDAP
'23', # identityAwarenessDataTrans
'39', # identityAwarenessRADIUSAccounting
'40', # identityAwarenessIdentityCollectorActiveDirectory
'41', # identityAwarenessIdentityCollectorCiscoISE
'42', # identityAwarenessTerminalServer
'43', # identityAwarenessRemoteAccess
'44', # identityAwarenessIdentityWebAPI
'101', # identityAwarenessStatus
'102', # identityAwarenessStatusShortDesc
'103', # identityAwarenessStatusLongDesc
]),
}
\ No newline at end of file
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