#!/usr/bin/python
# -*- encoding: utf-8; py-indent-offset: 4 -*-
# +------------------------------------------------------------------+
# |             ____ _               _        __  __ _  __           |
# |            / ___| |__   ___  ___| | __   |  \/  | |/ /           |
# |           | |   | '_ \ / _ \/ __| |/ /   | |\/| | ' /            |
# |           | |___| | | |  __/ (__|   <    | |  | | . \            |
# |            \____|_| |_|\___|\___|_|\_\___|_|  |_|_|\_\           |
# |                                                                  |
# | Copyright Dennis Lerch                   dennis.lerch@telekom.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-
# ails.  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.


#SNMPv2-SMI::enterprises.3375.2.1.1.1.1.19.0 = INTEGER: 0  #Version < 11.2
#SNMPv2-SMI::enterprises.3375.2.1.14.3.1.0 = INTEGER: 3    #Version >= 11.2


check_info["f5_bigip_cluster_status"] = {
    "parse_function"          : parse_f5_bigip_cluster_status,
    "check_function"          : lambda x,y,z: check_f5_bigip_cluster_status(x,y,z, is_v11_2 = False),
    "inventory_function"      : inventory_f5_bigip_cluster_status,
    "node_info"               : True,
    "group"                   : "cluster_status",
    "default_levels_variable" : "f5_bigip_cluster_default_levels",
    "service_description"     : "BIG-IP Cluster Status",
    "snmp_info"               : (".1.3.6.1.4.1.3375.2.1.1.1.1.19", ["0"]), # sysAttrFailoverUnitMask
    "snmp_scan_function"      : lambda oid: scan_f5_bigip_cluster_status(oid, is_v11_2 = False),
    "includes"                : ["f5_bigip.include"],
}


check_info["f5_bigip_cluster_status.v11_2"] = {
    "inventory_function"      : lambda info: [],
    "check_function"          : lambda x,y,z: (3, "This check is deprecated. Please perform a re-discovery."),
    "service_description"     : "BIG-IP Cluster Status",
    "node_info"               : True,
    "group"                   : "cluster_status",
    "default_levels_variable" : "f5_bigip_cluster_default_levels",
}
