Compare commits

...

2 Commits
master ... 2.0

Author SHA1 Message Date
gpochiscan ffe574da56
Update README.MD 2021-12-13 12:08:21 +02:00
George Pochiscan 43179b7073 Added compatibility with CheckMK 2.0 2021-12-13 12:03:32 +02:00
9 changed files with 52 additions and 112 deletions

View File

@ -1,3 +1,5 @@
This version is compatible with CheckMK 2.0
Extend the current infoblox checks with following metrics:
DNS AAT5 Latency

Binary file not shown.

View File

@ -1,28 +1,14 @@
#!/usr/bin/python
# -*- encoding: utf-8; py-indent-offset: 4 -*-
# +------------------------------------------------------------------+
# | ____ _ _ __ __ _ __ |
# | / ___| |__ ___ ___| | __ | \/ | |/ / |
# | | | | '_ \ / _ \/ __| |/ / | |\/| | ' / |
# | | |___| | | | __/ (__| < | | | | . \ |
# | \____|_| |_|\___|\___|_|\_\___|_| |_|_|\_\ |
# | |
# | Copyright Mathias Kettner 2016 mk@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.
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Copyright (C) 2019 tribe29 GmbH - License: GNU General Public License v2
# This file is part of Checkmk (https://checkmk.com). It is subject to the terms and
# conditions defined in the file COPYING, which is part of this source code package.
# NOTE: Careful when replacing the *-import below with a more specific import. This can cause
# problems because it might remove variables from the check-context which are necessary for
# resolving legacy discovery results such as [("SUMMARY", "diskstat_default_levels")]. Furthermore,
# it might also remove variables needed for accessing discovery rulesets.
from cmk.base.check_legacy_includes.infoblox import * # pylint: disable=wildcard-import,unused-wildcard-import
#ibNetworkMonitorDNSAAT5Count(.1.3.6.1.4.1.7779.3.1.1.2.1.3.1.3.2.2.0)--)--DNS AAT5 Count"
@ -43,12 +29,12 @@ def check_infoblox_aat5_count(item, params, info):
if count > warn:
if count > crit:
state = 2
count_info = "Number of AAT5 Requests is %s (crit above %s requests)" % (count, crit)
count_info = "Number of AAT Requests is %s (crit above %s requests)" % (count, crit)
else:
state = 1
count_info = "Number of AAT5 Requests is %s (warn above %s requests)" % (count, warn)
count_info = "Number of AAT Requests is %s (warn above %s requests)" % (count, warn)
else:
count_info = "Number of AAT5 Requests is %s" % count
count_info = "Number of AAT Requests is %s" % count
yield state, count_info, [('Count', count, warn, crit)]
check_info['infoblox_aat5_count'] = {
@ -60,5 +46,4 @@ check_info['infoblox_aat5_count'] = {
'snmp_scan_function': scan_infoblox,
'has_perfdata': True,
'group': 'infoblox_count',
'includes': ["infoblox.include"],
}

View File

@ -1,28 +1,14 @@
#!/usr/bin/python
# -*- encoding: utf-8; py-indent-offset: 4 -*-
# +------------------------------------------------------------------+
# | ____ _ _ __ __ _ __ |
# | / ___| |__ ___ ___| | __ | \/ | |/ / |
# | | | | '_ \ / _ \/ __| |/ / | |\/| | ' / |
# | | |___| | | | __/ (__| < | | | | . \ |
# | \____|_| |_|\___|\___|_|\_\___|_| |_|_|\_\ |
# | |
# | Copyright Mathias Kettner 2016 mk@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.
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Copyright (C) 2019 tribe29 GmbH - License: GNU General Public License v2
# This file is part of Checkmk (https://checkmk.com). It is subject to the terms and
# conditions defined in the file COPYING, which is part of this source code package.
# NOTE: Careful when replacing the *-import below with a more specific import. This can cause
# problems because it might remove variables from the check-context which are necessary for
# resolving legacy discovery results such as [("SUMMARY", "diskstat_default_levels")]. Furthermore,
# it might also remove variables needed for accessing discovery rulesets.
from cmk.base.check_legacy_includes.infoblox import * # pylint: disable=wildcard-import,unused-wildcard-import
#ibNetworkMonitorDNSAAT5AvgLatency(.1.3.6.1.4.1.7779.3.1.1.2.1.3.1.3.2.1.0)--)--DNS AAT5 Latency
@ -60,5 +46,4 @@ check_info['infoblox_aat5_latency'] = {
'snmp_scan_function': scan_infoblox,
'has_perfdata': True,
'group': 'infoblox_latency',
'includes': ["infoblox.include"],
}

View File

@ -1,29 +1,14 @@
#!/usr/bin/python
# -*- encoding: utf-8; py-indent-offset: 4 -*-
# +------------------------------------------------------------------+
# | ____ _ _ __ __ _ __ |
# | / ___| |__ ___ ___| | __ | \/ | |/ / |
# | | | | '_ \ / _ \/ __| |/ / | |\/| | ' / |
# | | |___| | | | __/ (__| < | | | | . \ |
# | \____|_| |_|\___|\___|_|\_\___|_| |_|_|\_\ |
# | |
# | Copyright Mathias Kettner 2016 mk@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.
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Copyright (C) 2019 tribe29 GmbH - License: GNU General Public License v2
# This file is part of Checkmk (https://checkmk.com). It is subject to the terms and
# conditions defined in the file COPYING, which is part of this source code package.
# NOTE: Careful when replacing the *-import below with a more specific import. This can cause
# problems because it might remove variables from the check-context which are necessary for
# resolving legacy discovery results such as [("SUMMARY", "diskstat_default_levels")]. Furthermore,
# it might also remove variables needed for accessing discovery rulesets.
from cmk.base.check_legacy_includes.infoblox import * # pylint: disable=wildcard-import,unused-wildcard-import
#ibNetworkMonitorDNSNonAAT5Count(.1.3.6.1.4.1.7779.3.1.1.2.1.3.1.2.2.2.0)--)--DNS NonAAT5 Count
infoblox_nonaat5_count_default_levels = (50, 100)
@ -44,12 +29,12 @@ def check_infoblox_nonaat5_count(item, params, info):
if count > warn:
if count > crit:
state = 2
count_info = "Number of NonAAT5 Requests is %s (crit above %s requests)" % (count, crit)
count_info = "Number of NonAAT Requests is %s (crit above %s requests)" % (count, crit)
else:
state = 1
count_info = "Number of NonAAT5 Requests is %s (warn above %s requests)" % (count, warn)
count_info = "Number of NonAAT Requests is %s (warn above %s requests)" % (count, warn)
else:
count_info = "Number of NonAAT5 Requests is %s" % count
count_info = "Number of NonAAT Requests is %s" % count
yield state, count_info, [('Count', count, warn, crit)]
check_info['infoblox_nonaat5_count'] = {
@ -61,5 +46,4 @@ check_info['infoblox_nonaat5_count'] = {
'snmp_scan_function': scan_infoblox,
'has_perfdata': True,
'group': 'infoblox_count',
'includes': ["infoblox.include"],
}

View File

@ -1,29 +1,14 @@
#!/usr/bin/python
# -*- encoding: utf-8; py-indent-offset: 4 -*-
# +------------------------------------------------------------------+
# | ____ _ _ __ __ _ __ |
# | / ___| |__ ___ ___| | __ | \/ | |/ / |
# | | | | '_ \ / _ \/ __| |/ / | |\/| | ' / |
# | | |___| | | | __/ (__| < | | | | . \ |
# | \____|_| |_|\___|\___|_|\_\___|_| |_|_|\_\ |
# | |
# | Copyright Mathias Kettner 2016 mk@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.
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Copyright (C) 2019 tribe29 GmbH - License: GNU General Public License v2
# This file is part of Checkmk (https://checkmk.com). It is subject to the terms and
# conditions defined in the file COPYING, which is part of this source code package.
# NOTE: Careful when replacing the *-import below with a more specific import. This can cause
# problems because it might remove variables from the check-context which are necessary for
# resolving legacy discovery results such as [("SUMMARY", "diskstat_default_levels")]. Furthermore,
# it might also remove variables needed for accessing discovery rulesets.
from cmk.base.check_legacy_includes.infoblox import * # pylint: disable=wildcard-import,unused-wildcard-import
#ibNetworkMonitorDNSNonAAT5AvgLatency(.1.3.6.1.4.1.7779.3.1.1.2.1.3.1.2.2.1.0)--DNS NonAAT5 Latency
infoblox_nonaat5_latency_default_levels = (50, 100)
@ -61,5 +46,4 @@ check_info['infoblox_nonaat5_latency'] = {
'snmp_scan_function': scan_infoblox,
'has_perfdata': True,
'group': 'infoblox_latency',
'includes': ["infoblox.include"],
}

View File

@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/env python3
# -*- encoding: utf-8; py-indent-offset: 4 -*-
# +------------------------------------------------------------------+
# | ____ _ _ __ __ _ __ |

View File

@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/env python3
# -*- encoding: utf-8; py-indent-offset: 4 -*-
# +------------------------------------------------------------------+
# | ____ _ _ __ __ _ __ |