diff --git a/checks/cisco_asa_connections b/checks/cisco_asa_connections index ce7eab947b1b6358e34a2770f8f52055f56ff5d1..72c54338531c074b64ca6f2179cf9dfc0f6d28b0 100644 --- a/checks/cisco_asa_connections +++ b/checks/cisco_asa_connections @@ -2,9 +2,11 @@ # -*- encoding: utf-8; py-indent-offset: 4 -*- # # created by Th.L.: +# # Monitors Cisco ASA connection count -# works with Cisco ASA 55xx and later -# tested witch 5506W and 5512-X, 5585-SSP2 +# +# works with Cisco ASA 55xx and later, tested witch 5506W and 5512-X, 5585-SSP2 +# # 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) @@ -15,11 +17,14 @@ # .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 # +# CISCO-FIREWALL-MIB::cfwConnectionStatValue.protoIp.currentInUse = Gauge32: 4987 +# CISCO-FIREWALL-MIB::cfwConnectionStatValue.protoIp.high = Gauge32: 17517 +# # sample info # # [[u'4987', u'17517']] # -# connection levels (war,crit,minimum) +# connection levels (warn,crit,minimum) cisco_asa_connections_default_levels = (3000, 5000,100) @@ -33,7 +38,9 @@ def check_cisco_asa_connections(_no_item, params, info): 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)] + # label value warn crit min max + perfdata = [('current_connections', current_connections, warn, crit, 1000, 2000), + ('max_connections', max_connections)] infotext = '' if current_connections >= crit: diff --git a/cisco_asa_connections.mkp b/cisco_asa_connections.mkp index f1b767230768bec07b5f76275dad01c44ee61829..22ea3f5f4cd44cfe8cb72dab0fcd38641306365a 100644 Binary files a/cisco_asa_connections.mkp and b/cisco_asa_connections.mkp differ diff --git a/web/plugins/metrics/cisco_asa_connections.py b/web/plugins/metrics/cisco_asa_connections.py index fc7714bdde93463fbbe9f8124580122a4742ce84..7c33f9ea75811f5cdb478ba748eb1d796ab75591 100644 --- a/web/plugins/metrics/cisco_asa_connections.py +++ b/web/plugins/metrics/cisco_asa_connections.py @@ -9,33 +9,33 @@ ##################################################################################################################### # -# define units for cisco_asa_connections perfdata +# define units # ##################################################################################################################### ##################################################################################################################### # -# define metrics for cisco_asa_connections perfdata +# define metrics # ##################################################################################################################### metric_info['cisco_asa_connections_current_connections'] = { 'title': _('current conections'), 'unit': 'count', - 'color': '11/a', + 'color': '26/a', } metric_info['cisco_asa_connections_max_connections'] = { 'title': _('max conections'), 'unit': 'count', - 'color': '21/a', + 'color': '11/a', } ###################################################################################################################### # -# map cisco_asa_connections perfdata to metric, not really necessary but makes sure to use the right metrics +# map perfdata to metric # ###################################################################################################################### @@ -46,15 +46,15 @@ check_metrics['check_mk-cisco_asa_connections'] = { ###################################################################################################################### # -# how to graph perdata for cisco_asa_connections +# how to graph perdata # ###################################################################################################################### graph_info.append({ 'title': _('connections'), 'metrics': [ - ('cisco_asa_connections_current_connections', 'line'), ('cisco_asa_connections_max_connections', 'line'), + ('cisco_asa_connections_current_connections', 'area'), ], 'scalars': [ ('cisco_asa_connections_current_connections:crit', _('crit level')), @@ -64,7 +64,7 @@ graph_info.append({ ###################################################################################################################### # -# define perf-o-meter for cisco_asa_connections rpm +# define perf-o-meter # ###################################################################################################################### diff --git a/web/plugins/wato/cisco_asa_connections.py b/web/plugins/wato/cisco_asa_connections.py index 518b0c38b5554774c65ba5fca12e79c4092a30cf..f5c50b0b805c805763c5ffd3b3f6c66bc19b5311 100644 --- a/web/plugins/wato/cisco_asa_connections.py +++ b/web/plugins/wato/cisco_asa_connections.py @@ -3,7 +3,7 @@ # # Author : Th.L. # Content: wato plugin for snmp check 'cisco_asa_connections' -# to configure waring/critical levels +# to configure waring/critical/minimum levels # # register_check_parameters( @@ -13,9 +13,9 @@ register_check_parameters( Tuple( title=_('Cisco ASA current connections'), elements=[ - Integer(title=_('warning at'), unit=_(' connections'), default_value=3000), - Integer(title=_('critical at'), unit=_(' connections'), default_value=5000), - Integer(title=_('minimum'), unit=_(' connections'), default_value=100), + Integer(title=_('warning at'), unit=_('connections'), default_value=3000), + Integer(title=_('critical at'), unit=_('connections'), default_value=5000), + Integer(title=_('minimum'), unit=_('connections'), default_value=100), ] ), None, None