Module: check_mk
Branch: master
Commit: be314f3601a70491e01dc195b8015343f63678c4
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=be314f3601a704…
Author: Bastian Kuhn <bk(a)mathias-kettner.de>
Date: Wed Aug 1 03:58:59 2012 +0200
Added missing documentaion
---
checkman/cisco_mem | 10 ++++++
checkman/f5_bigip_interfaces | 10 ++++++
checkman/fortigate_cpu | 19 ++++++++++++
checkman/fortigate_memory | 19 ++++++++++++
checkman/fortigate_sessions | 19 ++++++++++++
checks/f5_bigip_interfaces | 65 ++++++++++++++++++++++++++++++++++++++++++
6 files changed, 142 insertions(+), 0 deletions(-)
diff --git a/checkman/cisco_mem b/checkman/cisco_mem
new file mode 100644
index 0000000..b37bb11
--- /dev/null
+++ b/checkman/cisco_mem
@@ -0,0 +1,10 @@
+title: Cisco Memory Check
+agents: snmp
+author: Bastian Kuhn <bk(a)mathias-kettner.de>
+license: GPL
+distribution: check_mk
+description:
+ This check monitors the memory usage of cisco devices. The check separates between
+ cpu and i/o pool.
+inventory:
+ A check for i/o pool and one for cpu pool will be created.
diff --git a/checkman/f5_bigip_interfaces b/checkman/f5_bigip_interfaces
new file mode 100644
index 0000000..6dbcc7e
--- /dev/null
+++ b/checkman/f5_bigip_interfaces
@@ -0,0 +1,10 @@
+title: F5 Bigip Interface check
+agents: snmp
+author: Bastian Kuhn <bk(a)mathias-kettner.de>
+license: GPL
+distribution: check_mk
+description:
+ This check will monitor the special network interfaces on a F5 Bigip Device.
+ He shows the current bandwhidth of the connection an detects changes of portstate
+inventory:
+ Eeach interface which is up will be added as a new check.
diff --git a/checkman/fortigate_cpu b/checkman/fortigate_cpu
new file mode 100644
index 0000000..b442b66
--- /dev/null
+++ b/checkman/fortigate_cpu
@@ -0,0 +1,19 @@
+title: Fortigate CPU Check
+agents: snmp
+author: Bastian Kuhn <bk(a)mathias-kettner.de>
+license: GPL
+distribution: check_mk
+description:
+ This check monitors the cpu levels for fortigate firewalls
+inventory:
+ One service will be created
+
+[parameters]
+warning (float): Minimum cpu load for warning level
+crit (float): Minimum cpu load for critical level
+
+[configuration]
+fortigate_cpu_default_levels = (float, float): The default levels for all checks of this
kind.
+
+perfdata:
+ current utilization
diff --git a/checkman/fortigate_memory b/checkman/fortigate_memory
new file mode 100644
index 0000000..f0fdebf
--- /dev/null
+++ b/checkman/fortigate_memory
@@ -0,0 +1,19 @@
+title: Fortigate memory levels
+agents: snmp
+author: Bastian Kuhn <bk(a)mathias-kettner.de>
+license: GPL
+distribution: check_mk
+description:
+ This check monitors the used memory on fortigate firewalls
+inventory:
+ One service will be created
+
+[parameters]
+warning (int): Minimum memory usage for warning level
+crit (int): Minimum memory usage for critical level
+
+[configuration]
+fortigate_memory_default_levels = (int, int): The default levels for all checks of this
kind.
+
+perfdata:
+ current memory usage
diff --git a/checkman/fortigate_sessions b/checkman/fortigate_sessions
new file mode 100644
index 0000000..4eaaa32
--- /dev/null
+++ b/checkman/fortigate_sessions
@@ -0,0 +1,19 @@
+title: Fortigate sessions Checks
+agents: snmp
+author: Bastian Kuhn <bk(a)mathias-kettner.de>
+license: GPL
+distribution: check_mk
+description:
+ This check monitors the current amount of sessions on an Fortigate Firewall device
+inventory:
+ One service will be created
+
+[parameters]
+warning (int): Minimum seesion count for warning level
+crit (int): Minimum session count for critical level
+
+[configuration]
+fortigate_sessions_default_levels = (int, int): The default levels for all checks of this
kind.
+
+perfdata:
+ current amount of sessions on the device
diff --git a/checks/f5_bigip_interfaces b/checks/f5_bigip_interfaces
new file mode 100644
index 0000000..54dde44
--- /dev/null
+++ b/checks/f5_bigip_interfaces
@@ -0,0 +1,65 @@
+#!/usr/bin/python
+# -*- encoding: utf-8; py-indent-offset: 4 -*-
+# +------------------------------------------------------------------+
+# | ____ _ _ __ __ _ __ |
+# | / ___| |__ ___ ___| | __ | \/ | |/ / |
+# | | | | '_ \ / _ \/ __| |/ / | |\/| | ' / |
+# | | |___| | | | __/ (__| < | | | | . \ |
+# | \____|_| |_|\___|\___|_|\_\___|_| |_|_|\_\ |
+# | |
+# | Copyright Mathias Kettner 2012 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-
+# 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.
+
+# .1.3.6.1.4.1.3375.2.1.2.4.4.3.1.1. index for ifname
+# .1.3.6.1.4.1.3375.2.1.2.4.4.3.1.13. index for ifstate
+# .1.3.6.1.4.1.3375.2.1.2.4.4.3.1.3. index for OUT bytes
+# .1.3.6.1.4.1.3375.2.1.2.4.4.3.1.5. index for IN bytes
+
+def check_f5_bigip_interfaces(item, params, info):
+ for port, ifstate, inbytes, outbytes in info:
+ if item == port:
+ if int(ifstate) != 0:
+ states = {
+ 2 : "down (has no link and is initialized)",
+ 3 : "disabled has been forced down)",
+ 4 : "uninitialized (has not been initialized)",
+ 5 : "loopback (in loopback mode)",
+ 6 : "unpopulated (interface not physically populated)",
+ }
+ return(2, "CRIT - State of %s is %s" % (states[ifstate],
port))
+ this_time = int(time.time())
+ in_timedif, in_per_sec = get_counter("f5.interface.in.%s" % item,
this_time, int(inbytes))
+ out_timedif, out_per_sec = get_counter("f5_interface.out.%s" % item,
this_time, int(outbytes))
+
+
+ inbytes_h = get_bytes_human_readable(in_per_sec)
+ outbytes_h = get_bytes_human_readable(out_per_sec)
+ perf = [
+ ("bytes_in", in_per_sec),
+ ("bytes_out", out_per_sec),
+ ]
+ return (0, "OK - in bytes: %s/s, out bytes: %s/s" % (inbytes_h,
outbytes_h), perf)
+
+
+check_info["f5_bigip_interfaces"] = {
+ "check_function" : check_f5_bigip_interfaces,
+ "inventory_function" : lambda info: [ (x[0], {'state': 0 } ) for
x in info if int(x[1]) == 0],
+ "service_description" : "f5 Interface %s",
+ "has_perfdata" : True,
+ "snmp_scan_function" : lambda oid:
".1.3.6.1.4.1.3375.2.1.3.4.20" in oid(".1.3.6.1.2.1.1.2.0"),
+ "snmp_info" : ( ".1.3.6.1.4.1.3375.2.1.2.4.4.3.1",
[1, 13, 3, 5]),
+