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

Delete checkpoint_ica

parent bd37f882
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 : 2018-08-02
# #
# Monitor status of Check Point internal ca (ica)
#
#
# 23/09/2019: parameter discovery
# 08/06/2020: changed snm-scan function
#
# sample snmpwalk
#
# .1.3.6.1.4.1.2620.1.19.1.0 = Hex-STRING: 43 50 20 49 6E 74 65 72 6E 61 6C 20 43 41 00
# .1.3.6.1.4.1.2620.1.19.2.0 = Gauge32: 1
# .1.3.6.1.4.1.2620.1.19.3.0 = STRING: "26"
# .1.3.6.1.4.1.2620.1.19.4.0 = STRING: "0"
# .1.3.6.1.4.1.2620.1.19.5.0 = STRING: "6"
# .1.3.6.1.4.1.2620.1.19.6.0 = STRING: "0"
# .1.3.6.1.4.1.2620.1.19.7.0 = STRING: "20"
# .1.3.6.1.4.1.2620.1.19.8.0 = STRING: "0"
# .1.3.6.1.4.1.2620.1.19.9.0 = STRING: "0"
# .1.3.6.1.4.1.2620.1.19.10.0 = STRING: "0"
# .1.3.6.1.4.1.2620.1.19.11.0 = STRING: "0"
# .1.3.6.1.4.1.2620.1.19.12.0 = STRING: "18"
# .1.3.6.1.4.1.2620.1.19.13.0 = STRING: "8"
# .1.3.6.1.4.1.2620.1.19.14.0 = Gauge32: 1
# .1.3.6.1.4.1.2620.1.19.15.0 = Gauge32: 991140056
#
# OMD[mysite]:~$ snmpbulkwalk -v2c -c public -m CHECKPOINT-MIB 192.168.10.150:161 .1.3.6.1.4.1.2620.1.19
# CHECKPOINT-MIB::products.19.1.0 = Hex-STRING: 43 50 20 49 6E 74 65 72 6E 61 6C 20 43 41 00
# CHECKPOINT-MIB::products.19.2.0 = Gauge32: 1
# CHECKPOINT-MIB::products.19.3.0 = STRING: "26"
# CHECKPOINT-MIB::products.19.4.0 = STRING: "0"
# CHECKPOINT-MIB::products.19.5.0 = STRING: "6"
# CHECKPOINT-MIB::products.19.6.0 = STRING: "0"
# CHECKPOINT-MIB::products.19.7.0 = STRING: "20"
# CHECKPOINT-MIB::products.19.8.0 = STRING: "0"
# CHECKPOINT-MIB::products.19.9.0 = STRING: "0"
# CHECKPOINT-MIB::products.19.10.0 = STRING: "0"
# CHECKPOINT-MIB::products.19.11.0 = STRING: "0"
# CHECKPOINT-MIB::products.19.12.0 = STRING: "18"
# CHECKPOINT-MIB::products.19.13.0 = STRING: "8"
# CHECKPOINT-MIB::products.19.14.0 = Gauge32: 1
# CHECKPOINT-MIB::products.19.15.0 = Gauge32: 991140056
#
# sample info
#
# [[u'CP Internal CA\x00', u'1', u'26', u'0', u'6', u'0', u'20', u'0', u'0', u'0', u'0', u'18', u'8', u'1', u'991140056']]
#
factory_settings['checkpoint_ica_defaults'] = {
}
def inventory_checkpoint_ica(info):
#print info
if info[0][0].lower() == 'cp internal ca\x00':
return [(None, {})]
def check_checkpoint_ica(item, params, info):
if info[0][0].lower() == 'cp internal ca\x00':
state = 0
infotext = ''
longoutput = ''
perfdata = []
icaprodname, icaStatus, icaTotalNumberOfCertificates, icaPendingCertificates, icaValidCertificates, \
icaRenewedCertificates, icaRevocedCertificates, icaExpieredCertificates, icaTotalCertificatesOfUsers, \
icaCertificatesOfInternalUsers, icaCertificatesOfLdapUsers, icaTotalNumberOfSicCertificates, \
icaTotalNumberOfIkeCertificates, icaLastCrlDistributionPoint, icaBuild = info[0]
infotext += 'Build: %s' % icaBuild
infotext += ' Status: %s' % icaStatus
# infotext += ' Total number of certificates: %s' % icaTotalNumberOfCertificates
# infotext += ' PendingCertificates: %s' % icaPendingCertificates
# infotext += ' Valid certificates: %s' % icaValidCertificates
# infotext += ' Renewed Certificates: %s' % icaRenewedCertificates
# infotext += ' Revoced certificates: %s' % icaRevocedCertificates
# infotext += ' Expiered Certificates: %s' % icaExpieredCertificates
# infotext += ' Total certificates of users: %s' % icaTotalCertificatesOfUsers
# infotext += ' CertificatesOfInternalUsers: %s' % icaCertificatesOfInternalUsers
# infotext += ' Certificates of LDAP users: %s' % icaCertificatesOfLdapUsers
# infotext += ' Total number of SIC certificates: %s' % icaTotalNumberOfSicCertificates
# infotext += ' Total number of IKE certificates: %s' % icaTotalNumberOfIkeCertificates
# infotext += ' Last Crl Distribution Point: %s' % icaLastCrlDistributionPoint
longoutput += '\nBuild: %s' % icaBuild
longoutput += '\nTotal number of certificates: %s' % icaTotalNumberOfCertificates
longoutput += '\nValid certificates: %s' % icaValidCertificates
longoutput += '\nPending certificates: %s' % icaPendingCertificates
longoutput += '\nRevoced certificates: %s' % icaRevocedCertificates
longoutput += '\nTotal certificates of users: %s' % icaTotalCertificatesOfUsers
longoutput += '\nCertificates of LDAP users: %s' % icaCertificatesOfLdapUsers
longoutput += '\nCertificates of internal users: %s' % icaCertificatesOfInternalUsers
longoutput += '\nTotal number of SIC certificates: %s' % icaTotalNumberOfSicCertificates
longoutput += '\nTotal number of IKE certificates: %s' % icaTotalNumberOfIkeCertificates
longoutput += '\nRenewed Certificates: %s' % icaRenewedCertificates
longoutput += '\nExpiered Certificates: %s' % icaExpieredCertificates
longoutput += '\nStatus: %s' % icaStatus
longoutput += '\nLast Crl Distribution Point: %s' % icaLastCrlDistributionPoint
# 'unit', <value>, <warn-at>, <crit-at>, <min value>, <max value>
# perfdata = [('dtpsconnectedusers', dtpsconnectedusers, warn, crit, 0, dtpslicensedusers),
# ]
return state, infotext + longoutput, perfdata
check_info['checkpoint_ica'] = {
'check_function' : check_checkpoint_ica,
'inventory_function' : inventory_checkpoint_ica,
'default_levels_variable': 'checkpoint_ica_defaults',
'service_description' : 'Internal CA',
'group' : 'checkpoint_ica',
'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.19', [ # CHECKPOINT-MIB::products.19 (not described in MIB file :-( )
'1', # icaProdName
'2', # ica_2 # _Status_|LastCrlDistributionPoint
'3', # ica_3 # TotalNumberOfCertificates
'4', # ica_4 # PendingCertificates
'5', # ica_5 # ValidCertificates
'6', # ica_6 # ExpieredCertificates|RenewedCertificates
'7', # ica_7 # RevocedCertificates
'8', # ica_8 # ExpieredCertificates|RenewedCertificates
'9', # ica_9 # TotalCertificatesOfUsers
'10', # ica_10 # CertificatesOfInternalUsers
'11', # ica_11 # CertificatesOfLdapUsers
'12', # ica_12 # TotalNumberOfSicCertificates
'13', # ica_13 # TotalNumberOfIkeCertificates
'14', # ica_14 # Status|_LastCrlDistributionPoint_
'15', # icaBuild
]),
}
\ 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