Module: check_mk
Branch: master
Commit: 612a44477fbf14b9958b2a356a138b2232fc1cb1
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=612a44477fbf14…
Author: Florian Heigl <fh(a)mathias-kettner.de>
Date: Fri Jun 3 17:45:29 2011 +0200
New check man page for f5_bigip_cluster - check to monitor config sync status
---
checkman/f5_bigip_cluster | 24 ++++++++++++++++++++++++
1 files changed, 24 insertions(+), 0 deletions(-)
diff --git a/checkman/f5_bigip_cluster b/checkman/f5_bigip_cluster
new file mode 100644
index 0000000..ed5b1d0
--- /dev/null
+++ b/checkman/f5_bigip_cluster
@@ -0,0 +1,24 @@
+title: Check status of system fans on F5 Big-IP
+agents: snmp
+author: Florian Heigl <fh(a)mathias-kettner.de>
+license: GPL
+distribution: check_mk
+description:
+ The check queries the MIB tables of F5 BIG-IP loadbalancers (local traffic managers) to identify
+ if all system configs are in-sync when running a load balancing cluster.
+ It will issue a warning if one of the nodes is out of sync, or a critical on one of the two following conditions:
+ - both nodes have differing configs
+ - the node being checked has the status "unconfigured"
+
+
+ It supports devices running the 9.0 and above releases of the F5 OS. It's tested against 9.3
+ devices.
+
+
+
+inventory:
+ One service is defined for the cluster status unless the load balancer config sync is in a status of "unconfigured"
+
+
+perfdata:
+ the check does not (yet) generate performance data.
Module: check_mk
Branch: master
Commit: 948d56520a53b070015b86368628364c565eeed9
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=948d56520a53b0…
Author: Florian Heigl <fh(a)mathias-kettner.de>
Date: Fri Jun 3 17:36:23 2011 +0200
New check man page: f5_bigip_fans (might be updated once more testers have tested the check)
---
checkman/f5_bigip_fans | 21 +++++++++++++++++++++
1 files changed, 21 insertions(+), 0 deletions(-)
diff --git a/checkman/f5_bigip_fans b/checkman/f5_bigip_fans
new file mode 100644
index 0000000..23d5698
--- /dev/null
+++ b/checkman/f5_bigip_fans
@@ -0,0 +1,21 @@
+title: Check status of system fans on F5 Big-IP
+agents: snmp
+author: Florian Heigl <fh(a)mathias-kettner.de>
+license: GPL
+distribution: check_mk
+description:
+ The check queries the MIB tables of F5 BIG-IP loadbalancers (local traffic managers) for the
+ status of builtin fan. It will alert if the rotational speed falls to lower-than-normal levels.
+
+ It supports devices running the 9.0 and above releases of the F5 OS. It's tested against 9.3
+ devices.
+
+
+
+inventory:
+ The check gather a list of the existing fans in a system.
+ It labels them as either chassis or CPU fans.
+
+
+perfdata:
+ the check does not (yet) generate performance data.
Module: check_mk
Branch: master
Commit: 1bacc202473ceda3bc291da1d4b96ceddd922706
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=1bacc202473ced…
Author: Florian Heigl <fh(a)mathias-kettner.de>
Date: Fri Jun 3 16:41:18 2011 +0200
New checks: f5_bigip_cluster (cluster sync status), f5_bigip_fans (system and cpu fan status). Needs testing, man pages.
---
checks/f5_bigip_cluster | 79 +++++++++++++++++++++++++++++++++++++++++
checks/f5_bigip_fans | 89 +++++++++++++++++++++++++++++++++++++++++++++++
checks/f5_bigip_pool | 14 ++++----
3 files changed, 175 insertions(+), 7 deletions(-)
diff --git a/checks/f5_bigip_cluster b/checks/f5_bigip_cluster
new file mode 100644
index 0000000..e0ecb01
--- /dev/null
+++ b/checks/f5_bigip_cluster
@@ -0,0 +1,79 @@
+#!/usr/bin/python
+# -*- encoding: utf-8; py-indent-offset: 4 -*-
+# +------------------------------------------------------------------+
+# | ____ _ _ __ __ _ __ |
+# | / ___| |__ ___ ___| | __ | \/ | |/ / |
+# | | | | '_ \ / _ \/ __| |/ / | |\/| | ' / |
+# | | |___| | | | __/ (__| < | | | | . \ |
+# | \____|_| |_|\___|\___|_|\_\___|_| |_|_|\_\ |
+# | |
+# | Copyright Mathias Kettner 2010 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.
+
+
+# Agent / MIB output
+# see: 1.3.6.1.4.1.3375.2.1.1.1.1.6.0
+# F5-BIGIP-SYSTEM-MIB::sysAttrConfigsyncState (STRING)
+# "-1 - uninitialized or disabled config state"
+
+# F5 nodes need to be ntp synced otherwise status reports might be wrong.
+
+
+def inventory_f5_bigip_cluster(checkname, info):
+ # run inventory unless we found a device in unconfigured state
+ # don't need to loop over the input as there's only one status.
+ if len(info) == 1 and not info[0][0].startswith("-1"):
+ return [(None, None)]
+ return []
+
+
+def check_f5_bigip_cluster(item, _no_params, info):
+ cfgsyncstate = info[0][0]
+
+ # Split the snmp supplied status string to the numeric and textual status
+ statusid, statustxt = cfgsyncstate.split(" - ")
+
+ # Possible states:
+ # -1 unconfigured, ok only if original status
+ # otherwise this would mean something is heavily broken?
+ # 0 in sync, ok
+ # 1/2 one system outdated, warn
+ # 3 both systems outdated, crit (config split brain)
+
+ if statusid == "0":
+ return (0, "OK - " + statustxt)
+ elif statusid == "-1":
+ return (2, "CRIT - " + statustxt)
+ elif statusid == "1" or statusid == "2":
+ return (1, "WARNING - " + statustxt)
+ elif statusid == "3":
+ return (2, "CRIT - " + statustxt)
+ else:
+ return (3, "UNKNOWN - unexpected Output from SNMP Agent")
+
+
+snmp_info["f5_bigip_cluster"] = \
+ ( ".1.3.6.1.4.1.3375.2.1.1.1.1", [
+ 6, # sysAttrConfigsyncState
+ ])
+
+
+check_info["f5_bigip_cluster"] = (check_f5_bigip_cluster, "Config Sync status", 0, inventory_f5_bigip_cluster )
+
+
+snmp_scan_functions["f5_bigip_cluster"] = \
+ lambda oid: '.1.3.6.1.4.1.3375.2' in oid(".1.3.6.1.2.1.1.2.0") and "big-ip" in oid(".1.3.6.1.4.1.3375.2.1.4.1.0").lower()
diff --git a/checks/f5_bigip_fans b/checks/f5_bigip_fans
new file mode 100644
index 0000000..e27aa52
--- /dev/null
+++ b/checks/f5_bigip_fans
@@ -0,0 +1,89 @@
+#!/usr/bin/python
+# -*- encoding: utf-8; py-indent-offset: 4 -*-
+# +------------------------------------------------------------------+
+# | ____ _ _ __ __ _ __ |
+# | / ___| |__ ___ ___| | __ | \/ | |/ / |
+# | | | | '_ \ / _ \/ __| |/ / | |\/| | ' / |
+# | | |___| | | | __/ (__| < | | | | . \ |
+# | \____|_| |_|\___|\___|_|\_\___|_| |_|_|\_\ |
+# | |
+# | Copyright Mathias Kettner 2010 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.
+
+
+# Agent / MIB output
+# see: 1.3.6.1.4.1.3375.2.1.3.2.1.2 (Chassis fans)
+# F5-BIGIP-SYSTEM-MIB::sysChassisFanEntry
+# see: 1.3.6.1.4.1.3375.2.1.3.1.1 (CPU & CPU fans)
+# sysCpuGroup
+
+
+def f5_bigip_fans_genitem(fanid):
+ fanid = int(fanid)
+ if fanid < 10:
+ fantype = "Processor"
+ elif fanid >=100:
+ fantype = "Chassis"
+ else:
+ fantype = "Unknown"
+ return ("%s %d" % (fantype, fanid))
+
+
+def inventory_f5_bigip_fans(checkname, info):
+ inventory = []
+ for line in info:
+ for fanentry in line:
+ inventory.append((f5_bigip_fans_genitem(fanentry[0]), None))
+
+ return inventory
+
+
+def check_f5_bigip_fans(item, _no_params, info):
+ for line in info:
+ for fanentry in line:
+ if f5_bigip_fans_genitem(fanentry[0]) == item:
+ speed = int(fanentry[1])
+ if "Chassis" in item:
+ # the "normal" speed is around 10K RPM
+ warn, crit = (7500, 2000)
+ else:
+ # F5's CPU Fans run around 6K RPM
+ warn, crit = (4000, 1200)
+ msgtxt = " - speed is %d rpm" % speed
+ if speed > warn:
+ return (0, "OK" + msgtxt)
+ elif speed < crit:
+ return (2, "CRITCAL" + msgtxt)
+ elif speed < warn:
+ return (1, "WARNING" + msgtxt)
+ else:
+ return (3, "UNKNOWN - could not detect speed")
+
+ return (3, "UNKNOWN - item not found in SNMP output")
+
+
+snmp_info["f5_bigip_fans"] = \
+ [ (".1.3.6.1.4.1.3375.2.1.3.2.1.2.1", [ 1, 3 ]),
+ ( ".1.3.6.1.4.1.3375.2.1.3.1.2.1", [ 1, 3 ]), ]
+
+
+check_info["f5_bigip_fans"] = (check_f5_bigip_fans, "Fan %s", 0, inventory_f5_bigip_fans )
+
+
+# Get ID and Speed from the CPU and chassis fan tables
+snmp_scan_functions["f5_bigip_fans"] = \
+ lambda oid: '.1.3.6.1.4.1.3375.2' in oid(".1.3.6.1.2.1.1.2.0") and "big-ip" in oid(".1.3.6.1.4.1.3375.2.1.4.1.0").lower()
diff --git a/checks/f5_bigip_pool b/checks/f5_bigip_pool
index 7126b91..63ca11a 100644
--- a/checks/f5_bigip_pool
+++ b/checks/f5_bigip_pool
@@ -53,9 +53,9 @@ def check_f5_bigip_pool(item, params, info):
pool_def_members = int(line[2])
if pool_act_members == pool_def_members or pool_act_members > warn_num_members:
- return (0, "OK - all members online")
+ return (0, "OK - all members online")
elif pool_act_members <= crit_num_members:
- return (2, "CRIT - only %s pool member(s) left" % pool_act_members)
+ return (2, "CRIT - only %s pool member(s) left" % pool_act_members)
elif pool_act_members == 0:
return (2, "CRIT - no pool members left")
elif pool_act_members <= warn_num_members:
@@ -64,16 +64,16 @@ def check_f5_bigip_pool(item, params, info):
return (3, "UNKNOWN output for pool %s" % item)
return (3, "UNKNOWN - unexpected Output from SNMP Agent")
-
+
snmp_info["f5_bigip_pool"] = \
( ".1.3.6.1.4.1.3375.2.2.5.1.2.1", [
- 1, # ltmPoolEntry
- 8, # ltmPoolActiveMemberCnt
- 23, # ltmPoolMemberCnt
+ 1, # ltmPoolEntry
+ 8, # ltmPoolActiveMemberCnt
+ 23, # ltmPoolMemberCnt
])
-check_info["f5_bigip_pool"] = (check_f5_bigip_pool, "Load Balancing Pool %s", 0, inventory_f5_bigip_pool )
+check_info["f5_bigip_pool"] = (check_f5_bigip_pool, "Load Balancing Pool %s", 0, inventory_f5_bigip_pool )
snmp_scan_functions["f5_bigip_pool"] = \
Module: check_mk
Branch: master
Commit: 5388f0edd2baa257c9b0987936fa3b0536cdeab8
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=5388f0edd2baa2…
Author: Florian Heigl <fh(a)mathias-kettner.de>
Date: Fri Jun 3 11:25:48 2011 +0200
new option f5_bigip_pool_default_levels allows to configure the warning and crit levels of active pool members per load balancing pool.
---
checkman/f5_bigip_pool | 16 ++++++++++++++++
checks/f5_bigip_pool | 20 +++++++++++++-------
2 files changed, 29 insertions(+), 7 deletions(-)
diff --git a/checkman/f5_bigip_pool b/checkman/f5_bigip_pool
index b7a2032..ff847af 100644
--- a/checkman/f5_bigip_pool
+++ b/checkman/f5_bigip_pool
@@ -12,9 +12,25 @@ description:
It supports devices running the 9.0 and above releases of the F5 OS. It's tested against 9.3
devices.
+examples:
+ # Let the Pool named ABC on your first F5 be in WARNING state when it reaches 5 active members or in CRITICAL for anything between 3 and 0.
+ check_parameters += [
+ ( (5, 3), [ "f5-1" ], [ "Load Balancing Pool Pool_ABC" ]),
+ ]
+
+
inventory:
The check gather a list of the pools defined on a system. It will include non-enabled ones,
as this is considered a temporary state.
+[parameters]
+warning (int): Issue a warning if there's this many or less members left in a load balancing pool
+crit (int): Go to critical state if there's this many members left in a load balancing pool. Note: 0 active members will always result in a critical state.
+
+[configuration]
+f5_bigip_pool_default_levels = (int, int): The default levels for all F5 BIG-IP pool checks. This is preset to {(2, 1)}.
+
+
+
perfdata:
the check does not (yet) generate performance data.
diff --git a/checks/f5_bigip_pool b/checks/f5_bigip_pool
index 69086bc..7126b91 100644
--- a/checks/f5_bigip_pool
+++ b/checks/f5_bigip_pool
@@ -32,28 +32,34 @@
# F5-BIGIP-LOCAL-MIB::ltmPoolActiveMemberCnt. 8.80.111.111.108.95.78.77.65 = 0
+# warn, crit numbers of pool members
+f5_bigip_pool_default_levels = (2, 1)
+
+
def inventory_f5_bigip_pool(checkname,info):
# inventorize all pools and their member count
inventory = []
for line in info:
if line[0] != "":
- inventory.append((line[0],None))
+ inventory.append((line[0],"f5_bigip_pool_default_levels"))
return inventory
-def check_f5_bigip_pool(item, _no_params, info):
+def check_f5_bigip_pool(item, params, info):
for line in info:
if line[0] == item:
+ warn_num_members, crit_num_members = params
pool_act_members = int(line[1])
pool_def_members = int(line[2])
- if pool_act_members == pool_def_members:
+
+ if pool_act_members == pool_def_members or pool_act_members > warn_num_members:
return (0, "OK - all members online")
- elif pool_act_members > 1:
- return (1, "WARN - only %i of %i pool members are up" % (pool_act_members, pool_def_members))
- elif pool_act_members == 1:
- return (2, "CRIT - only 1 pool member left")
+ elif pool_act_members <= crit_num_members:
+ return (2, "CRIT - only %s pool member(s) left" % pool_act_members)
elif pool_act_members == 0:
return (2, "CRIT - no pool members left")
+ elif pool_act_members <= warn_num_members:
+ return (1, "WARN - only %i of %i pool members are up" % (pool_act_members, pool_def_members))
else:
return (3, "UNKNOWN output for pool %s" % item)
return (3, "UNKNOWN - unexpected Output from SNMP Agent")
Module: check_mk
Branch: master
Commit: fceb4dacc34ef1c1c6f11f11e7f87dace9ccb4c0
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=fceb4dacc34ef1…
Author: Florian Heigl <fh(a)mathias-kettner.de>
Date: Tue May 31 09:13:12 2011 +0200
fix doc to reflect variable names from check
---
checkman/tcp_conn_stats | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/checkman/tcp_conn_stats b/checkman/tcp_conn_stats
index 0e14777..46ccdf0 100644
--- a/checkman/tcp_conn_stats
+++ b/checkman/tcp_conn_stats
@@ -17,11 +17,11 @@ inventory:
examples:
# set levels for TIME_WAIT and ESTABLISHED
- tcp_conn_state_default_levels = { "TIME_WAIT" : (20, 50), "ESTABLISHED" : (100, 200) }
+ tcp_conn_stats_default_levels = { "TIME_WAIT" : (20, 50), "ESTABLISHED" : (100, 200) }
[parameters]
levels(dict from string to (int, int)): A python dictionary from check state to a pair of integers for warning and critical levels. For state types not listed in the dictionary no state check is done. The default parameter is an empty dictionary, which makes this check always OK.
[configuration]
-tcp_conn_state_default_levels (dict from string to (int, int)): default levels used for all
- inventorized checks.
+tcp_conn_stats_default_levels (dict from string to (int, int)): default levels used for all
+ inventorized checks. This might be renamed to tcp_conn_states_default_levels in the future.