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

cleanup

parents
No related branches found
No related tags found
No related merge requests found
# Powe Supply
**replaced by original CheckMK check**
Monitors status of Check Point appliace power supplys
Check Info:
* *service*: this check will create one service per power supply
* *state*: **critical** if powerSupplyStatus is not 'UP'
* *wato*: none
* *perfdata*: none
Testetd with: 23800, 15600 and 5400 appliance models
**Note: check with your hardware manual the power supply id and placement**
Sample output
![sample output](/doc/sample.png?raw=true "sample [SHORT TITLE]")
File added
#!/usr/bin/python
# -*- encoding: utf-8; py-indent-offset: 4 -*-
#
#
# Monitor status of Check Point appliance power supply
#
# Author: Th.L.
# Date : 2018-07-31
#
# 2018-07-31:
#
#
# sample snmpwalk (two power supplys)
#
# CHECKPOINT-MIB::powerSupplyIndex.1.0 = INTEGER: 1
# CHECKPOINT-MIB::powerSupplyIndex.2.0 = INTEGER: 2
# CHECKPOINT-MIB::powerSupplyStatus.1.0 = STRING: Up
# CHECKPOINT-MIB::powerSupplyStatus.2.0 = STRING: Up
#
#
# .1.3.6.1.4.1.2620.1.6.7.9.1.1.1.1.0 = INTEGER: 1
# .1.3.6.1.4.1.2620.1.6.7.9.1.1.1.2.0 = INTEGER: 2
# .1.3.6.1.4.1.2620.1.6.7.9.1.1.2.1.0 = STRING: Up
# .1.3.6.1.4.1.2620.1.6.7.9.1.1.2.2.0 = STRING: Up
#
#
# sample info
# two power supplys
# [[u'1', u'Up'], [u'2', u'Up']]
#
#
factory_settings['checkpoint_powersupply_defaults'] = {
}
def inventory_checkpoint_powersupply(info):
for powersupply in info:
psindex, psstatus = powersupply
if psindex.isdigit():
yield psindex, {}
def check_checkpoint_powersupply(item, params, info):
for powersupply in info:
psindex, psstatus = powersupply
if psindex == item:
state = 0
infotext = ''
longoutput = ''
infotext = 'Status: %s' % psstatus
if psstatus.lower() != 'up':
status = 2
return state, infotext + longoutput
check_info['checkpoint_powersupply'] = {
'check_function' : check_checkpoint_powersupply,
'inventory_function' : inventory_checkpoint_powersupply,
'default_levels_variable' : 'checkpoint_powersupply_defaults',
'service_description' : 'Power supply %s',
'group' : 'cp_powersupply',
#'snmp_scan_function': lambda oid: oid('.1.3.6.1.2.1.1.2.0') in ['.1.3.6.1.4.1.2620.1.6.123.1.67', # ClusterXL Gateway
# '.1.3.6.1.4.1.2620.1.6.123.1.65', # Appliance
# '.1.3.6.1.4.1.2620.1.6.123.1.64', # VSX Gateway
# '.1.3.6.1.4.1.2620.1.6.123.1.62', # Gateway
# '.1.3.6.1.4.1.2620.1.6.123.1.49', # R77.30 Gateway
# '.1.3.6.1.4.1.2620.1.6.123.1.48', # Mgmt
'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'),
'snmp_info' : ('.1.3.6.1.4.1.2620.1.6.7.9.1.1', [ # CHECKPOINT-MIB::powerSupplyEntry
'1', # powerSupplyIndex
'2', # powerSupplyStatus
]),
}
doc/sample.png

9.06 KiB

{'author': u'Th.L. (thl-cmk[at]outlook[dot]com)',
'description': u'Monitor Check Point appliance power supply status\n\n- critical if state not "up".\n- no perfdata\n- no wato\n',
'download_url': 'https://thl-cmk.hopto.org',
'files': {'checks': ['checkpoint_powersupply']},
'name': 'checkpoint_powersupply',
'num_files': 1,
'title': u'Check Point power supply status',
'version': '20180731.v0.0.1',
'version.min_required': '1.2.8b8',
'version.packaged': '1.4.0p35'}
\ 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