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

update project

parent fba53943
No related branches found
No related tags found
No related merge requests found
......@@ -11,52 +11,44 @@
# 03.05.2018: fixed inventory for empty sensorname (asa context)
#
# warn, crit, minimum temp value
cisco_asa_temp_default_levels = (60, 70, 20)
factory_settings['cisco_asa_temp_default_levels'] = {'levels_lower': (0.0, -10.0),
'levels': (60, 80),
'output_unit': 'c',
'device_levels_handling': 'usr',
}
def inventory_cisco_asa_temp(info):
for sensorname, sensortype, sensorvalue, sensorstatus, sensorunits in info:
if sensortype == '8' and sensorstatus == '1' and sensorname != '':
yield sensorname, cisco_asa_temp_default_levels
yield sensorname, None
def check_cisco_asa_temp(item, params, info):
warn, crit, minimum = params
infotext = 'item not found(!!)'
state = 3
params = []
for sensorname, sensortype, sensorvalue, sensorstatus, sensorunits in info:
if sensorname == item and sensortype == '8':
sensorvalue = int(sensorvalue)
infotext = u'%d \xB0C' % (sensorvalue)
perfdata = [('temp', sensorvalue, warn, crit)]
if sensorvalue >= crit:
infotext += u' (>=%d \xB0C)(!!)' % crit
return 2, infotext, perfdata
elif sensorvalue >= warn:
infotext += u' (>=%d \xB0C)(!)' % warn
return 1, infotext, perfdata
elif sensorvalue < minimum:
infotext += u' (<%d \xB0C)(!!)' % minimum
return 2, infotext, perfdata
else:
return 0, infotext, perfdata
yield check_temperature(reading=float(sensorvalue),
params=params,
unique_name='cisco_asa_temp_%s' % sensorname,
# dev_status=int(sensorstatus)
)
return tate, infotext, perfdata
check_info['cisco_asa_temp'] = {
'check_function' : check_cisco_asa_temp,
'inventory_function' : inventory_cisco_asa_temp,
'service_description': 'Environment: %s',
'has_perfdata' : True,
'group' : 'cisco_asa_temp',
'snmp_scan_function' : lambda oid: oid('.1.3.6.1.2.1.1.1.0').lower().startswith('cisco adaptive security appliance'),
'snmp_info' : ( '.1.3.6.1.2.1', [
'47.1.1.1.1.7', #ENTITY-MIB::entPhysicalName
'99.1.1.1.1', #ENTITY-SENSOR-MIB::entPhySensorType
'99.1.1.1.4', #ENTITY-SENSOR-MIB::entPhySensorValue
'99.1.1.1.5', #ENTITY-SENSOR-MIB::entPhySensorOperStatus
'99.1.1.1.6', #ENTITY-SENSOR-MIB::entPhySensorUnitsDisplay
] ),
'check_function' : check_cisco_asa_temp,
'inventory_function' : inventory_cisco_asa_temp,
'service_description' : 'Temperature %s',
'has_perfdata' : True,
'group' : 'temperature',
'default_levels_variable' : 'cisco_asa_temp_default_levels',
'snmp_scan_function' : lambda oid: oid('.1.3.6.1.2.1.1.1.0').lower().startswith('cisco adaptive security appliance'),
'snmp_info' : ('.1.3.6.1.2.1', [
'47.1.1.1.1.7', #ENTITY-MIB::entPhysicalName
'99.1.1.1.1', #ENTITY-SENSOR-MIB::entPhySensorType
'99.1.1.1.4', #ENTITY-SENSOR-MIB::entPhySensorValue
'99.1.1.1.5', #ENTITY-SENSOR-MIB::entPhySensorOperStatus
'99.1.1.1.6', #ENTITY-SENSOR-MIB::entPhySensorUnitsDisplay
]),
'includes': ['temperature.include'],
}
No preview for this file type
{'author': 'Th.L. (thl-cmk[at]outlook[dot]com)',
'description': 'Monitors Cisco ASA Temperatur sensors\nMinimum/Warning/Critical temperature level can be configured via wato',
{'author': u'Th.L. (thl-cmk[at]outlook[dot]com)',
'description': u'Monitors Cisco ASA Temperatur sensors\n\nRewrite for CMK 1.6x to include "temperature.include"\n\nNOTE: changed item from Environment: <Sensorname> to Temperature <Sensorname>\n',
'download_url': 'https://thl-cmk.hopto.org',
'files': {'checkman': ['cisco_asa_temp'],
'checks': ['cisco_asa_temp'],
'pnp-templates': [],
'web': ['plugins/wato/cisco_asa_temp.py',
'plugins/metrics/cisco_asa_temp.py']},
'files': {'checkman': ['cisco_asa_temp'], 'checks': ['cisco_asa_temp']},
'name': 'cisco_asa_temp',
'num_files': 4,
'title': 'monitor Cisco ASA temperature sensors',
'version': '20180503.v03a',
'version.min_required': '1.2.6p12',
'num_files': 2,
'title': u'monitor Cisco ASA temperature sensors',
'version': '20200224.v04',
'version.min_required': '1.6.0',
'version.packaged': '1.6.0p8'}
\ 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