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

update project

parent 51f98b67
Branches master
No related tags found
No related merge requests found
......@@ -8,45 +8,46 @@
# 24.03.2016: changed "snmp_scan_function" from ".1.3.6.1.2.1.1.2.0" to ".1.3.6.1.2.1.1.1.0"
# 02.07.2016: fixed crit/warn to >=
# 09.01.2018: some fine tuning (changed infotext)
# 13.02.2020: changed snmp_info from ".1.3.6.1.4.1.9.9.147.1.2.2.2.1.5" to more specific "1.3.6.1.4.1.9.9.147.1.2.2.2.1.5.40"
#
# sample snmp walk
#
# .1.3.6.1.4.1.9.9.147.1.2.2.2.1.5.40.6 = Gauge32: 16684
# .1.3.6.1.4.1.9.9.147.1.2.2.2.1.5.40.7 = Gauge32: 46797
# .1.3.6.1.4.1.9.9.147.1.2.2.2.1.5.40.6 = Gauge32: 4987
# .1.3.6.1.4.1.9.9.147.1.2.2.2.1.5.40.7 = Gauge32: 17517
#
# sample info
#
# [[u'16684'], [u'46797']]
# [[u'4987', u'17517']]
#
# connection levels (war,crit,minimum)
cisco_asa_connections_default_levels = (3000, 5000,100)
def inventory_cisco_asa_connections(info):
current_connections = info[0]
max_connections = info[1]
return [(None, cisco_asa_connections_default_levels)]
if len(info) > 0:
return [(None, cisco_asa_connections_default_levels)]
def check_cisco_asa_connections(item, params, info):
warn, crit, minimum = params
current_connections = int(info[0][0])
max_connections = int(info[1][0])
perfdata = [('current_connections', current_connections, warn, crit, '', ''), ('max_connections', max_connections)]
infotext = 'item not found'
def check_cisco_asa_connections(_no_item, params, info):
if len(info) > 0:
warn, crit, minimum = params
current_connections = int(info[0][0])
max_connections = int(info[0][1])
perfdata = [('current_connections', current_connections, warn, crit, '', ''), ('max_connections', max_connections)]
infotext = ''
if current_connections >= crit:
infotext = '%d (>=%d)(!!)/%d current/max connections' % (current_connections, crit, max_connections)
return 2, infotext, perfdata
elif current_connections >= warn:
infotext = '%d (>=%d)(!)/%d current/max connections' % (current_connections, warn, max_connections)
return 1, infotext, perfdata
elif current_connections < minimum:
infotext = '%d (<%d)(!!)/%d current/max connections' % (current_connections, minimum, max_connections)
return 2, infotext, perfdata
else:
infotext = '%d/%d current/max connections' % (current_connections, max_connections)
return 0, infotext, perfdata
if current_connections >= crit:
infotext = '%d (>=%d)(!!)/%d current/max connections' % (current_connections, crit, max_connections)
return 2, infotext, perfdata
elif current_connections >= warn:
infotext = '%d (>=%d)(!)/%d current/max connections' % (current_connections, warn, max_connections)
return 1, infotext, perfdata
elif current_connections < minimum:
infotext = '%d (<%d)(!!)/%d current/max connections' % (current_connections, minimum, max_connections)
return 2, infotext, perfdata
else:
infotext = '%d/%d current/max connections' % (current_connections, max_connections)
return 0, infotext, perfdata
check_info['cisco_asa_connections'] = {
......@@ -56,7 +57,8 @@ check_info['cisco_asa_connections'] = {
'has_perfdata' : True,
'group' : 'cisco_asa_connections',
'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.4.1.9.9.147.1.2.2.2.1', [
'5' # CISCO-FIREWALL-MIB::cfwConnectionStatValue
'snmp_info' : ('.1.3.6.1.4.1.9.9.147.1.2.2.2.1.5.40', [ # CISCO-FIREWALL-MIB::cfwConnectionStatValue.protoIp
'6', # CISCO-FIREWALL-MIB::cfwConnectionStatValue.protoIp.currentInUse
'7', # CISCO-FIREWALL-MIB::cfwConnectionStatValue.protoIp.high
]),
}
No preview for this file type
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