Module: check_mk
Branch: master
Commit: 21274150b34f0cb6ca6c8ad8fcbf435c99d83694
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=21274150b34f0c…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Mon Feb 19 16:57:55 2018 +0100
5850 Management board protocol can now be configured on folders
To make the configuration more flexible it is now possible to
configure the management board protocol on folders and inherit
this option to the hosts in a folder.
It is also possible to override the value inherited from a folder
to e.g. set it to "No management board" for specific hosts again.
Change-Id: If9a163ecdeb331768ede45c484af76cdadb8b7b8
---
.werks/5850 | 15 ++++++++++++
cmk_base/config.py | 29 +++++++++++++---------
web/htdocs/watolib.py | 1 +
web/plugins/wato/builtin_attributes.py | 44 +++++++++++++---------------------
4 files changed, 50 insertions(+), 39 deletions(-)
diff --git a/.werks/5850 b/.werks/5850
new file mode 100644
index 0000000..8200342
--- /dev/null
+++ b/.werks/5850
@@ -0,0 +1,15 @@
+Title: Management board protocol can now be configured on folders
+Level: 1
+Component: wato
+Compatible: compat
+Edition: cre
+Version: 1.5.0i4
+Date: 1519055783
+Class: feature
+
+To make the configuration more flexible it is now possible to
+configure the management board protocol on folders and inherit
+this option to the hosts in a folder.
+
+It is also possible to override the value inherited from a folder
+to e.g. set it to "No management board" for specific hosts again.
diff --git a/cmk_base/config.py b/cmk_base/config.py
index 9213114..513c09d 100644
--- a/cmk_base/config.py
+++ b/cmk_base/config.py
@@ -674,28 +674,35 @@ def management_protocol(hostname):
def _management_board_settings_of(hostname):
- rule_settings = rulesets.host_extra_conf(hostname, management_board_config)
attributes_of_host = host_attributes.get(hostname, {})
+
management_board = {
- "address": None,
- "protocol": None,
- "credentials": None,
+ "address" : None,
+ "protocol" : None,
+ "credentials" : None,
}
- if "management_protocol" not in attributes_of_host and not rule_settings:
+
+ # When management_protocol is set to no management board, don't do anything else
+ # -> The management board can not be enabled by the credentials rule
+ if not attributes_of_host.get("management_protocol"):
return management_board
- if rule_settings:
- protocol, credentials = rule_settings[0]
- management_board["protocol"] = protocol
- management_board["credentials"] = credentials
+ management_board["protocol"] = attributes_of_host["management_protocol"]
if attributes_of_host.get("management_address"):
management_board["address"] = attributes_of_host["management_address"]
else:
management_board["address"] = ipaddresses.get(hostname)
- if attributes_of_host.get("management_protocol"):
- management_board["protocol"] = attributes_of_host["management_protocol"]
+ # Set the defaults form the management board related ruleset. Use the first
+ # rule that matches the protocol configured for this host.
+ rule_settings = rulesets.host_extra_conf(hostname, management_board_config)
+ for protocol, credentials in rule_settings:
+ if protocol == management_board["protocol"]:
+ management_board["credentials"] = credentials
+ break
+
+ # Override the defaults set above with explicit host/folder settings
if attributes_of_host.get("management_snmp_community"):
management_board["credentials"] = attributes_of_host["management_snmp_community"]
diff --git a/web/htdocs/watolib.py b/web/htdocs/watolib.py
index f6c8845..bdb21be 100644
--- a/web/htdocs/watolib.py
+++ b/web/htdocs/watolib.py
@@ -1449,6 +1449,7 @@ class CREFolder(BaseFolder):
else:
all_hosts.append(hostentry)
+ # TODO: Management board?
for attribute_name, dictionary in [
( "ipaddress", ipv4_addresses ),
( "ipv6address", ipv6_addresses ),
diff --git a/web/plugins/wato/builtin_attributes.py b/web/plugins/wato/builtin_attributes.py
index b1feafb..d4f7bf7 100644
--- a/web/plugins/wato/builtin_attributes.py
+++ b/web/plugins/wato/builtin_attributes.py
@@ -489,34 +489,12 @@ declare_host_attribute(NetworkScanResultAttribute(),
topic = _("Network Scan"))
-class ManagementTypeAttribute(Attribute):
- def __init__(self, name):
- self._choices = [
- ("snmp", "SNMP"),
- #("ipmi", "IPMI"),
- #("ping", _("Ping-only"))
- ]
-
- self._choices_dict = dict(self._choices)
-
- Attribute.__init__(self, name, _("Protocol"),
- _("Specify the protocol used to connect to the management board."))
-
- def paint(self, value, hostname):
- return "", self._choices_dict.get(value, value)
-
- def render_input(self, varprefix, value):
- html.dropdown(varprefix + "protocol", self._choices, deflt=value)
-
- def from_html_vars(self, varprefix):
- return html.var(varprefix + "protocol")
-
declare_host_attribute(ValueSpecAttribute("management_address",
HostAddress(
title = _("Address"),
help = _("Address (IPv4 or IPv6) or dns name under which the "
"management board can be reached. If this is not set, "
- "the same address as that of the Host will be used."),
+ "the same address as that of the host will be used."),
allow_empty = False
)),
show_in_table = False,
@@ -524,11 +502,21 @@ declare_host_attribute(ValueSpecAttribute("management_address",
topic = _("Management Board")
)
-declare_host_attribute(ManagementTypeAttribute("management_protocol"),
- show_in_table = False,
- show_in_folder = False,
- topic = _("Management Board")
- )
+declare_host_attribute(ValueSpecAttribute("management_protocol",
+ DropdownChoice(
+ title = _("Protocol"),
+ help = _("Specify the protocol used to connect to the management board."),
+ choices = [
+ (None, _("No management board")),
+ ("snmp", "SNMP"),
+ #("ipmi", "IPMI"),
+ #("ping", _("Ping-only"))
+ ],
+ )),
+ show_in_table = False,
+ show_in_folder = True,
+ topic = _("Management Board")
+)
declare_host_attribute(ValueSpecAttribute("management_snmp_community",
SNMPCredentials(
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"],
+}
Module: check_mk
Branch: master
Commit: 08e7d1b6442bbd0e8417667b801fde0a85f08829
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=08e7d1b6442bbd…
Author: Marcel Schulte <ms(a)mathias-kettner.de>
Date: Fri Feb 16 15:16:57 2018 +0100
Revert "4867 F5 BIG-IP: new checks for vCMP guest monitoring" again, sorry for the noise...
This reverts commit 954e51fb23a8209f336eceb2ee00e9f447289539.
---
.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 deletions(-)
diff --git a/.werks/4867 b/.werks/4867
deleted file mode 100644
index 03d233a..0000000
--- a/.werks/4867
+++ /dev/null
@@ -1,16 +0,0 @@
-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
deleted file mode 100644
index fb6f158..0000000
--- a/checkman/f5_bigip_vcmpfailover
+++ /dev/null
@@ -1,14 +0,0 @@
-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
deleted file mode 100644
index 33ff8ed..0000000
--- a/checkman/f5_bigip_vcmpguests
+++ /dev/null
@@ -1,13 +0,0 @@
-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
deleted file mode 100644
index 29be96f..0000000
--- a/checks/f5_bigip_vcmpfailover
+++ /dev/null
@@ -1,68 +0,0 @@
-#!/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
deleted file mode 100644
index 225935a..0000000
--- a/checks/f5_bigip_vcmpguests
+++ /dev/null
@@ -1,68 +0,0 @@
-#!/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"],
-}