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 # ails. 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.25597.13.1.44.0 0
28 #.1.3.6.1.4.1.25597.13.1.45.0 603
29 #.1.3.6.1.4.1.25597.13.1.46.0 8
30 #.1.3.6.1.4.1.25597.13.1.47.0 0
31 #.1.3.6.1.4.1.25597.13.1.48.0 96
32 #.1.3.6.1.4.1.25597.13.1.49.0 0
34 factory_settings
['fireeye_mailq'] = {
41 def parse_fireeye_mailq(info
):
47 for index
, item
in enumerate(['Deferred', 'Hold', 'Incoming', 'Active', 'Drop']):
48 parsed
.update({item
: queue_infos
[index
]})
52 def check_fireeye_mailq(item
, params
, parsed
):
53 for queue
, value
in parsed
.iteritems():
54 infotext
= 'Mails in %s queue: %s' % (queue
.lower(), value
)
55 warn
, crit
= params
.get(queue
.lower(), (None, None))
56 counter
= 'mail_queue_%s_length' % queue
.lower()
57 yield fireeye_check_generic(infotext
, counter
, int(value
), warn
, crit
)
60 check_info
['fireeye_mailq'] = {
61 'parse_function': parse_fireeye_mailq
,
62 'inventory_function': lambda parsed
: inventory_fireeye_generic(parsed
, False, True),
63 'check_function': check_fireeye_mailq
,
64 'service_description': 'Mail Queues',
65 'default_levels_variable': 'fireeye_mailq',
66 'group': 'fireeye_mailq',
68 '.1.3.6.1.4.1.25597.13.1',
70 '44', # FE-FIREEYE-MIB::feDeferredEmailCount
71 '45', # FE-FIREEYE-MIB::feHoldQueueEmailCount
72 '47', # FE-FIREEYE-MIB::feIncomingEmailCount
73 '48', # FE-FIREEYE-MIB::feActiveEmailCount
74 '49', # FE-FIREEYE-MIB::feDropEmailCount
76 'snmp_scan_function': scan_fireeye
,
78 'includes': ['fireeye.include']