Module: check_mk
Branch: master
Commit: 4d7c0b5f038773ed40b159758820cae3e364b8e7
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=4d7c0b5f038773…
Author: Moritz Kiemer <mo(a)mathias-kettner.de>
Date: Tue May 22 08:22:10 2018 +0200
Count the SSL/VPN connections for "F5 BIG-IP Access Policy Manager SSL VPN and access
gateway"
Change-Id: Iefa3296f63c8269ec2df13ad7a71a7e6eca8a458
---
checkman/f5_bigip_apm | 13 +++++++++++
checks/f5_bigip_apm | 52 +++++++++++++++++++++++++++++++++++++++++
web/plugins/metrics/check_mk.py | 6 +++++
3 files changed, 71 insertions(+)
diff --git a/checkman/f5_bigip_apm b/checkman/f5_bigip_apm
new file mode 100644
index 0000000..ddc4d2b
--- /dev/null
+++ b/checkman/f5_bigip_apm
@@ -0,0 +1,13 @@
+title: F5 Big-IP: number of current SSL/VPN connections
+agents: snmp
+catalog: hw/network/f5
+license: GPL
+distribution: check_mk
+description:
+ The check queries the MIB tables of F5 Big-IP loadbalancers
+ for the total number of current SSL/VPN connections
+ {ampGlobalConnectivityStatCurConns}.
+
+inventory:
+ One service is created.
+
diff --git a/checks/f5_bigip_apm b/checks/f5_bigip_apm
new file mode 100644
index 0000000..5ea3e23
--- /dev/null
+++ b/checks/f5_bigip_apm
@@ -0,0 +1,52 @@
+#!/usr/bin/python
+# -*- encoding: utf-8; py-indent-offset: 4 -*-
+# +------------------------------------------------------------------+
+# | ____ _ _ __ __ _ __ |
+# | / ___| |__ ___ ___| | __ | \/ | |/ / |
+# | | | | '_ \ / _ \/ __| |/ / | |\/| | ' / |
+# | | |___| | | | __/ (__| < | | | | . \ |
+# | \____|_| |_|\___|\___|_|\_\___|_| |_|_|\_\ |
+# | |
+# | Copyright Mathias Kettner 2018 mk(a)mathias-kettner.de |
+# +------------------------------------------------------------------+
+#
+# This file is part of Check_MK.
+# The official homepage is at
http://mathias-kettner.de/check_mk.
+#
+# check_mk is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation in version 2. check_mk is distributed
+# in the hope that it will be useful, but WITHOUT ANY WARRANTY; with-
+# out even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE. See the GNU General Public License for more de-
+# tails. You should have received a copy of the GNU General Public
+# License along with GNU Make; see the file COPYING. If not, write
+# to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+# Boston, MA 02110-1301 USA.
+
+
+def inventory_f5_bigip_apm(info):
+ discovered = []
+ if info[0][0]:
+ discovered.append((None, None))
+ return discovered
+
+
+def check_f5_bigip_apm(item, _no_params, info):
+ count = info[0][0]
+ perfdata = [('connections_ssl_vpn', int(count), '', '', 0,
'')]
+ return 0, 'Connections: %s' % count, perfdata
+
+
+check_info['f5_bigip_apm'] = {
+ 'inventory_function' : inventory_f5_bigip_apm,
+ 'check_function' : check_f5_bigip_apm,
+ 'service_description' : 'SSL/VPN Connections',
+ 'snmp_info' : ('.1.3.6.1.4.1.3375.2.6.1.5.3', [
+ '0', #
F5-BIGIP-AMP-MIB::apmGlobalConnectivityStatCurConns
+ ]),
+ 'snmp_scan_function' : lambda oid: '.1.3.6.1.4.1.3375.2' in \
+ oid(".1.3.6.1.2.1.1.2.0") and
"big-ip" in \
+
oid(".1.3.6.1.4.1.3375.2.1.4.1.0").lower(),
+ 'has_perfdata' : True,
+}
diff --git a/web/plugins/metrics/check_mk.py b/web/plugins/metrics/check_mk.py
index fe2054f..1f2462a 100644
--- a/web/plugins/metrics/check_mk.py
+++ b/web/plugins/metrics/check_mk.py
@@ -1510,6 +1510,12 @@ metric_info["connections_ssl"] = {
"color" : "13/a",
}
+metric_info["connections_ssl_vpn"] = {
+ "title" : _("SSL/VPN connections"),
+ "unit" : "count",
+ "color" : "13/a",
+}
+
metric_info["connections_async_writing"] = {
"title" : _("Asynchronous writing connections"),
"unit" : "count",