2 # -*- encoding: utf-8; py-indent-offset: 4 -*-
3 # +------------------------------------------------------------------+
4 # | ____ _ _ __ __ _ __ |
5 # | / ___| |__ ___ ___| | __ | \/ | |/ / |
6 # | | | | '_ \ / _ \/ __| |/ / | |\/| | ' / |
7 # | | |___| | | | __/ (__| < | | | | . \ |
8 # | \____|_| |_|\___|\___|_|\_\___|_| |_|_|\_\ |
10 # | Copyright Mathias Kettner 2016 mk@mathias-kettner.de |
11 # +------------------------------------------------------------------+
13 # This file is part of Check_MK.
14 # The official homepage is at http://mathias-kettner.de/check_mk.
16 # check_mk is free software; you can redistribute it and/or modify it
17 # under the terms of the GNU General Public License as published by
18 # the Free Software Foundation in version 2. check_mk is distributed
19 # in the hope that it will be useful, but WITHOUT ANY WARRANTY; with-
20 # out even the implied warranty of MERCHANTABILITY or FITNESS FOR A
21 # PARTICULAR PURPOSE. See the GNU General Public License for more de-
22 # tails. You should have received a copy of the GNU General Public
23 # License along with GNU Make; see the file COPYING. If not, write
24 # to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
25 # Boston, MA 02110-1301 USA.
27 # .1.3.6.1.4.1.7779.3.1.1.4.1.3.1.0 0 --> IB-DHCPONE-MIB::ibDhcpTotalNoOfDiscovers.0
28 # .1.3.6.1.4.1.7779.3.1.1.4.1.3.2.0 0 --> IB-DHCPONE-MIB::ibDhcpTotalNoOfRequests.0
29 # .1.3.6.1.4.1.7779.3.1.1.4.1.3.3.0 0 --> IB-DHCPONE-MIB::ibDhcpTotalNoOfReleases.0
30 # .1.3.6.1.4.1.7779.3.1.1.4.1.3.4.0 0 --> IB-DHCPONE-MIB::ibDhcpTotalNoOfOffers.0
31 # .1.3.6.1.4.1.7779.3.1.1.4.1.3.5.0 0 --> IB-DHCPONE-MIB::ibDhcpTotalNoOfAcks.0
32 # .1.3.6.1.4.1.7779.3.1.1.4.1.3.6.0 0 --> IB-DHCPONE-MIB::ibDhcpTotalNoOfNacks.0
33 # .1.3.6.1.4.1.7779.3.1.1.4.1.3.7.0 0 --> IB-DHCPONE-MIB::ibDhcpTotalNoOfDeclines.0
34 # .1.3.6.1.4.1.7779.3.1.1.4.1.3.8.0 0 --> IB-DHCPONE-MIB::ibDhcpTotalNoOfInforms.0
35 # .1.3.6.1.4.1.7779.3.1.1.4.1.3.9.0 0 --> IB-DHCPONE-MIB::ibDhcpTotalNoOfOthers.0
38 def check_infoblox_dhcp_stats(_no_item
, _no_params
, info
):
39 discovers
, requests
, releases
, offers
, acks
, nacks
, \
40 declines
, informs
, others
= map(int, info
[0])
42 return check_infoblox_statistics("dhcp",
43 [("discovery", discovers
, "Received", "discovery messages"),
44 ("requests", requests
, "Received", "requests"),
45 ("releases", releases
, "Received", "releases"),
46 ("declines", declines
, "Received", "declines"),
47 ("informs", informs
, "Received", "informs"),
48 ("others", others
, "Received", "other messages"),
49 ("offers", offers
, "Sent", "offers"),
50 ("acks", acks
, "Sent", "acks"),
51 ("nacks", nacks
, "Sent", "nacks")])
54 check_info
['infoblox_dhcp_stats'] = {
55 'inventory_function': inventory_infoblox_statistics
,
56 'check_function': check_infoblox_dhcp_stats
,
57 'service_description': 'DHCP statistics',
59 ".1.3.6.1.4.1.7779.3.1.1.4.1.3",
61 "1", # IB-DHCPONE-MIB::ibDhcpTotalNoOfDiscovers
62 "2", # IB-DHCPONE-MIB::ibDhcpTotalNoOfRequests
63 "3", # IB-DHCPONE-MIB::ibDhcpTotalNoOfReleases
64 "4", # IB-DHCPONE-MIB::ibDhcpTotalNoOfOffers
65 "5", # IB-DHCPONE-MIB::ibDhcpTotalNoOfAcks
66 "6", # IB-DHCPONE-MIB::ibDhcpTotalNoOfNacks
67 "7", # IB-DHCPONE-MIB::ibDhcpTotalNoOfDeclines
68 "8", # IB-DHCPONE-MIB::ibDhcpTotalNoOfInforms
69 "9", # IB-DHCPONE-MIB::ibDhcpTotalNoOfOthers
71 'snmp_scan_function': scan_infoblox
,
73 'includes': ["infoblox.include"],