Module: check_mk
Branch: master
Commit: 38f5a65129e32cad57e7b74157320e41be77adec
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=38f5a65129e32c…
Author: Goetz Golla <gg(a)mathias-kettner.de>
Date: Thu Aug 21 17:25:36 2014 +0200
#0649 f5_bigip_pool: check now also prints the node names of down nodes
---
.werks/649 | 9 +++++++++
ChangeLog | 3 ++-
checkman/f5_bigip_pool | 16 ++++++++++------
checks/f5_bigip_pool | 44 ++++++++++++++++++++++++++++++++++----------
4 files changed, 55 insertions(+), 17 deletions(-)
diff --git a/.werks/649 b/.werks/649
new file mode 100644
index 0000000..f52d520
--- /dev/null
+++ b/.werks/649
@@ -0,0 +1,9 @@
+Title: f5_bigip_pool: check now also prints the node names of down nodes
+Level: 1
+Component: checks
+Compatible: compat
+Version: 1.2.5i6
+Date: 1408634689
+Class: feature
+
+
diff --git a/ChangeLog b/ChangeLog
index a14fdb2..2c62e78 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -27,9 +27,10 @@
* 1006 printer_pages: add Perf-O-Meter and PNP template
* 0646 brocade_fcport: the administrative states for which ports are inventorized can now be configured in WATO
* 1010 chrony: new check for NTP synchronization via chrony on Linux...
- * 0648 brocade_fcport: new speed calculation of isl_ports...
* 1011 ibm_svc_systemstats.disk_latency: introduce levels for alerting...
* 1372 cisco_vss: new check for monitoring state of Cisco Virtual Switches
+ * 0648 brocade_fcport: new speed calculation of isl_ports...
+ * 0649 f5_bigip_pool: check now also prints the node names of down nodes
* 1051 FIX: tcp_conn_stats: fix missing performance data...
* 1142 FIX: winperf_ts_sessions: fix computation, check has never really worked
* 1090 FIX: zfsget: fixed exception which happened on incomplete zfs entries
diff --git a/checkman/f5_bigip_pool b/checkman/f5_bigip_pool
index abae8dc..d39aef7 100644
--- a/checkman/f5_bigip_pool
+++ b/checkman/f5_bigip_pool
@@ -4,13 +4,17 @@ catalog: hw/network/f5
license: GPL
distribution: check_mk
description:
- The check queries the MIB tables of F5 BIG-IP loadbalancers (local traffic managers) for the
- status of any load balancing pools. It gathers the number of loadbalancers backing the pool
- and how many of those are working. It doesn't currently honor the 'MinUpMembers' parameter
- that can be set to trigger actions for the pool if too many members fail.
+ The check queries the MIB tables of F5 BIG-IP loadbalancers (local traffic
+ managers) for the status of any load balancing pools. It gathers the number
+ of loadbalancers backing the pool and how many of those are working. It
+ doesn't currently honor the 'MinUpMembers' parameter that can be set to
+ trigger actions for the pool if too many members fail.
- It supports devices running the 9.0 and above releases of the F5 OS. It's tested against 9.3
- devices.
+ It supports devices running the 9.0 and above releases of the F5 OS. It's
+ tested against 9.3 devices.
+
+ If the number of down nodes is warn or crit, the names of the nodes are
+ also printed in the service output.
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.
diff --git a/checks/f5_bigip_pool b/checks/f5_bigip_pool
index c81fc62..eafc323 100644
--- a/checks/f5_bigip_pool
+++ b/checks/f5_bigip_pool
@@ -39,14 +39,26 @@ 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:
+ for line in info[0]:
if line[0] != "":
inventory.append((line[0],"f5_bigip_pool_default_levels"))
return inventory
+def f5_bigip_pool_get_down_members(info, item):
+ downs = []
+ if len(info) < 2:
+ return
+ for line in info[1]:
+ if line[0] == item and line[2] != '4':
+ if re.match("\/\S*\/\S*", line[3]):
+ host = line[3].split("/")[2]
+ else:
+ host = line[3]
+ downs.append(host+":"+line[1])
+ return downs
def check_f5_bigip_pool(item, params, info):
- for line in info:
+ for line in info[0]:
if line[0] == item:
warn, crit = params
pool_act_members = int(line[1])
@@ -57,10 +69,14 @@ def check_f5_bigip_pool(item, params, info):
state = 0
elif pool_act_members <= crit:
state = 2
- message += " (Levels warn/crit below: %s/%s)" % ( warn, crit )
+ message += " (warn/crit: %s/%s)" % ( warn, crit )
elif pool_act_members <= warn:
state = 1
- message += " (Levels warn/crit below: %s/%s)" % ( warn, crit )
+ message += " (warn/crit: %s/%s)" % ( warn, crit )
+
+ if pool_act_members < pool_def_members:
+ downs = f5_bigip_pool_get_down_members(info, item)
+ message += ", down nodes: %s" % ", ".join(downs)
return state, message
return 3, "unexpected Output from SNMP Agent"
@@ -69,12 +85,20 @@ check_info["f5_bigip_pool"] = {
'check_function' : check_f5_bigip_pool,
'group' : 'f5_pools',
'inventory_function' : inventory_f5_bigip_pool,
- 'service_description': 'Load Balancing Pool %s',
- 'snmp_info': ('.1.3.6.1.4.1.3375.2.2.5.1.2.1', [
- 1, # ltmPoolEntry
- 8, # ltmPoolActiveMemberCnt
- 23, # ltmPoolMemberCnt
- ]),
+ 'service_description' : 'Load Balancing Pool %s',
+ 'snmp_info' : [
+ ('.1.3.6.1.4.1.3375.2.2.5.1.2.1', [
+ 1, # ltmPoolEntry
+ 8, # ltmPoolActiveMemberCnt
+ 23, # ltmPoolMemberCnt
+ ]),
+ ('.1.3.6.1.4.1.3375.2.2.5.3.2.1', [
+ 1, # ltmPoolMemberPoolName
+ 4, # ltmPoolMemberPort
+ 10, # ltmPoolMemberState
+ 19, # ltmPoolMemberNodeName
+ ]),
+ ],
'snmp_scan_function': \
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(),
Module: check_mk
Branch: master
Commit: 9a2f8a5567c882101aeb901d29a81930e7b9867b
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=9a2f8a5567c882…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Thu Aug 21 16:19:16 2014 +0200
#1156 FIX Graphs in HTML mails are now sent again where they where missing
A change from Tue Mar 4 prevented inclusion of PNP graphs in HTML mails
in installations where the user "omdadmin" is not existant. This change
fixes the problem and makes the graphs available again.
---
.werks/1156 | 11 +++++++++++
ChangeLog | 5 ++++-
notifications/mail | 3 +--
3 files changed, 16 insertions(+), 3 deletions(-)
diff --git a/.werks/1156 b/.werks/1156
new file mode 100644
index 0000000..485cc26
--- /dev/null
+++ b/.werks/1156
@@ -0,0 +1,11 @@
+Title: Graphs in HTML mails are now sent again where they where missing
+Level: 1
+Component: notifications
+Compatible: compat
+Version: 1.2.5i6
+Date: 1408630645
+Class: fix
+
+A change from Tue Mar 4 prevented inclusion of PNP graphs in HTML mails
+in installations where the user "omdadmin" is not existant. This change
+fixes the problem and makes the graphs available again.
diff --git a/ChangeLog b/ChangeLog
index a14fdb2..cc33960 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -27,9 +27,9 @@
* 1006 printer_pages: add Perf-O-Meter and PNP template
* 0646 brocade_fcport: the administrative states for which ports are inventorized can now be configured in WATO
* 1010 chrony: new check for NTP synchronization via chrony on Linux...
- * 0648 brocade_fcport: new speed calculation of isl_ports...
* 1011 ibm_svc_systemstats.disk_latency: introduce levels for alerting...
* 1372 cisco_vss: new check for monitoring state of Cisco Virtual Switches
+ * 0648 brocade_fcport: new speed calculation of isl_ports...
* 1051 FIX: tcp_conn_stats: fix missing performance data...
* 1142 FIX: winperf_ts_sessions: fix computation, check has never really worked
* 1090 FIX: zfsget: fixed exception which happened on incomplete zfs entries
@@ -68,6 +68,9 @@
* 1153 FIX: Changed custom user attributes can now be used immediately...
* 0201 FIX: Fixed error message in Rulelist of RBN...
+ Notifications:
+ * 1156 FIX: Graphs in HTML mails are now sent again where they where missing...
+
Event Console:
* 1007 FIX: check_mkevents: fix case where events contain binary zeroes
diff --git a/notifications/mail b/notifications/mail
index ee136cf..8921317 100755
--- a/notifications/mail
+++ b/notifications/mail
@@ -324,8 +324,7 @@ def fetch_pnp_data(context, params):
if not os.path.exists(path):
raise GraphException('Unable to locate pnp4nagios index.php (%s)' % path)
- #return os.popen('REMOTE_USER="%s" php %s %s "%s"' % (context['CONTACTNAME'], php_save_path, path, params)).read()
- return os.popen('REMOTE_USER="%s" php %s %s "%s"' % ('omdadmin', php_save_path, path, params)).read()
+ return os.popen('REMOTE_USER="%s" php %s %s "%s"' % (context['CONTACTNAME'], php_save_path, path, params)).read()
def fetch_num_sources(context):
svc_desc = context['WHAT'] == 'HOST' and '_HOST_' or context['SERVICEDESC']
Module: check_mk
Branch: master
Commit: 787089df3abff0a423db0a7243ec7b0fe8f02184
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=787089df3abff0…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Thu Aug 21 15:02:14 2014 +0200
views: Do not try to fetch a column named "site", it is no column
---
web/htdocs/views.py | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/web/htdocs/views.py b/web/htdocs/views.py
index bfb9c27..26ca660 100644
--- a/web/htdocs/views.py
+++ b/web/htdocs/views.py
@@ -835,6 +835,10 @@ def get_needed_columns(view, painters):
linkview = available_views.get(v)
if linkview:
columns += multisite_datasources[view['datasource']]['idkeys']
+ # The site attribute is no column. Filter it out here
+ if 'site' in columns:
+ columns.remove('site')
+
if len(entry) > 2 and entry[2]:
tt = entry[2]
columns += multisite_painters[tt]["columns"]