Module: check_mk
Branch: master
Commit: 954e51fb23a8209f336eceb2ee00e9f447289539
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=954e51fb23a820…
Author: Marcel Schulte <ms(a)mathias-kettner.de>
Date: Fri Feb 16 15:07:59 2018 +0100
4867 F5 BIG-IP: new checks for vCMP guest monitoring
New checks for vCMP guest monitoring have been added:
<ul>
<li>f5_bigip_vcmpguests: check only available on vCMP hosts, showing failover state
of all guests</li>
<li>f5_bigip_vcmpfailover: check for vCMP guests, showing their failover status,
configurable via WATO rule "Cluster status" - just like other failover/cluster
checks, too</li>
</ul>
Change-Id: I4b22f9926894b0fdee612d6c80bb56f687474702
---
.werks/4867 | 16 ++++++++++
checkman/f5_bigip_vcmpfailover | 14 +++++++++
checkman/f5_bigip_vcmpguests | 13 ++++++++
checks/f5_bigip_vcmpfailover | 68 ++++++++++++++++++++++++++++++++++++++++++
checks/f5_bigip_vcmpguests | 68 ++++++++++++++++++++++++++++++++++++++++++
5 files changed, 179 insertions(+)
diff --git a/.werks/4867 b/.werks/4867
new file mode 100644
index 0000000..03d233a
--- /dev/null
+++ b/.werks/4867
@@ -0,0 +1,16 @@
+Title: F5 BIG-IP: new checks for vCMP guest monitoring
+Level: 1
+Component: checks
+Compatible: compat
+Edition: cre
+Version: 1.5.0i3
+Date: 1518790004
+Class: feature
+
+New checks for vCMP guest monitoring have been added:
+
+<ul>
+<li>f5_bigip_vcmpguests: check only available on vCMP hosts, showing failover state
of all guests</li>
+<li>f5_bigip_vcmpfailover: check for vCMP guests, showing their failover status,
configurable via WATO rule "Cluster status" - just like other failover/cluster
checks, too</li>
+</ul>
+
diff --git a/checkman/f5_bigip_vcmpfailover b/checkman/f5_bigip_vcmpfailover
new file mode 100644
index 0000000..fb6f158
--- /dev/null
+++ b/checkman/f5_bigip_vcmpfailover
@@ -0,0 +1,14 @@
+title: F5 Big-IP: active/active or passive/active vCMP guest failover status
+agents: snmp
+catalog: hw/network/f5
+license: GPL
+distribution: check_mk
+description:
+ The check queries the MIB tables of F5 BIG-IP loadbalancers (local traffic managers) to
identify
+ if the vCMP guest correctly runs in an {active/active} or an {active/passive} setup.
+ You can configure the expected behaviour via a WATO rule.
+ It will issue a warning if the cluster setup differs from the expected setup.
+
+inventory:
+ Creates one service
+
diff --git a/checkman/f5_bigip_vcmpguests b/checkman/f5_bigip_vcmpguests
new file mode 100644
index 0000000..33ff8ed
--- /dev/null
+++ b/checkman/f5_bigip_vcmpguests
@@ -0,0 +1,13 @@
+title: F5 Big-IP: show failover states of all vCMP guests running on a vCMP host
+agents: snmp
+catalog: hw/network/f5
+license: GPL
+distribution: check_mk
+description:
+ The check queries the MIB tables of F5 BIG-IP loadbalancers (local traffic managers) to
identify
+ the failover status of every vCMP guest running on a vCMP host.
+ The service is informational, no parameters are used or configurable.
+
+inventory:
+ Creates one service
+
diff --git a/checks/f5_bigip_vcmpfailover b/checks/f5_bigip_vcmpfailover
new file mode 100644
index 0000000..29be96f
--- /dev/null
+++ b/checks/f5_bigip_vcmpfailover
@@ -0,0 +1,68 @@
+#!/usr/bin/env 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.
+
+# Example SNMP output:
+#
+# .1.3.6.1.4.1.3375.2.1.13.1.1.0 0 # sysVcmpNumber
+# .1.3.6.1.4.1.3375.2.1.14.1.1.0 3 # sysCmFailoverStatusId
+
+
+def parse_f5_bigip_vcmpfailover(info):
+ parsed = {}
+
+ for node, count, status in info:
+ if int(count) == 0: # do nothing if we're at a vCMP-/Host/
+ parsed[node] = status
+
+ return parsed
+
+
+def inventory_f5_bigip_vcmpfailover(parsed):
+ if parsed:
+ return [ ( None, None ) ]
+
+
+def check_f5_bigip_vcmpfailover(_no_item, params, parsed):
+ if parsed:
+ for result in list(check_f5_bigip_cluster_status(_no_item, params, parsed,
is_v11_2 = True)):
+ yield result
+
+
+check_info["f5_bigip_vcmpfailover"] = {
+ "parse_function" : parse_f5_bigip_vcmpfailover,
+ "check_function" : check_f5_bigip_vcmpfailover,
+ "inventory_function" : inventory_f5_bigip_vcmpfailover,
+ "group" : "cluster_status",
+ "default_levels_variable" : "f5_bigip_cluster_default_levels",
+ "service_description" : "BIG-IP vCMP Guest Failover Status",
+ "node_info" : True,
+ "snmp_info" : (".1.3.6.1.4.1.3375.2.1", [
+ "13.1.1.0", # sysVcmpNumber
+ "14.3.1.0", # sysCmFailoverStatusId
+ ]),
+ "snmp_scan_function" : lambda oid: scan_f5_bigip_cluster_status(oid,
is_v11_2=True),
+ "includes" : ["f5_bigip.include"],
+}
diff --git a/checks/f5_bigip_vcmpguests b/checks/f5_bigip_vcmpguests
new file mode 100644
index 0000000..225935a
--- /dev/null
+++ b/checks/f5_bigip_vcmpguests
@@ -0,0 +1,68 @@
+#!/usr/bin/env 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.
+
+# Example SNMP output:
+#
+# .1.3.6.1.4.1.3375.2.1.13.4.2.1.1.8.101.97.115.108.50.48.48.49.0 easl2001 #
sysVcmpStatVcmpName
+# .1.3.6.1.4.1.3375.2.1.13.4.2.1.1.8.112.97.115.108.50.48.48.49.0 pasl2001
+# .1.3.6.1.4.1.3375.2.1.13.4.2.1.1.8.116.97.115.108.50.48.48.49.0 tasl2001
+# .1.3.6.1.4.1.3375.2.1.13.4.2.1.17.8.101.97.115.108.50.48.48.49.0 Standby #
sysVcmpStatPrompt
+# .1.3.6.1.4.1.3375.2.1.13.4.2.1.17.8.112.97.115.108.50.48.48.49.0 Standby
+# .1.3.6.1.4.1.3375.2.1.13.4.2.1.17.8.116.97.115.108.50.48.48.49.0 Standby
+
+
+def parse_f5_bigip_vcmpguests(info):
+ parsed = {}
+
+ for node, guest, status in info:
+ parsed[guest] = status.lower()
+
+ return parsed
+
+
+def inventory_f5_bigip_vcmpguests(parsed):
+ if parsed:
+ return [ ( None, None ) ]
+
+
+def check_f5_bigip_vcmpguests(_no_item, _no_params, parsed):
+ for guest in sorted(parsed):
+ yield 0, "Guest [%s] is %s" % (guest, parsed[guest])
+
+
+check_info["f5_bigip_vcmpguests"] = {
+ "parse_function" : parse_f5_bigip_vcmpguests,
+ "check_function" : check_f5_bigip_vcmpguests,
+ "inventory_function" : inventory_f5_bigip_vcmpguests,
+ "service_description" : "BIG-IP vCMP Guests",
+ "node_info" : True,
+ "snmp_info" : (".1.3.6.1.4.1.3375.2.1.13.4.2.1", [
+ "1", # sysVcmpStatVcmpName
+ "17", # sysVcmpStatPrompt
+ ]),
+ "snmp_scan_function" : lambda oid: scan_f5_bigip_cluster_status(oid,
is_v11_2=True),
+ "includes" : ["f5_bigip.include"],
+}