Create nodes based on a service search"
Message-ID: <5339289d.9axEslwjsI1Saguu%ab(a)mathias-kettner.de>
User-Agent: Heirloom mailx 12.4 7/29/08
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Module: check_mk
Branch: master
Commit: 58eb05aad2ae27bc798e92b2a383e390ad85fc3d
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=58eb05aad2ae27…
Author: Andreas Boesl <ab(a)mathias-kettner.de>
Date: Mon Mar 31 10:34:34 2014 +0200
FIX BI editor: fixed display bug in "Create nodes based on a service search"
The WATO BI editor had some problems when displaying rules with the pattern<br>
"Create nodes based on a service search" -> "State of a service"
---
.werks/741 | 9 +++++++++
ChangeLog | 3 +++
web/htdocs/wato.py | 3 ++-
3 files changed, 14 insertions(+), 1 deletion(-)
diff --git a/.werks/741 b/.werks/741
new file mode 100644
index 0000000..956eb45
--- /dev/null
+++ b/.werks/741
@@ -0,0 +1,9 @@
+Title: BI editor: fixed display bug in "Create nodes based on a service search"
+Level: 1
+Component: bi
+Version: 1.2.5i2
+Date: 1396254706
+Class: fix
+
+The WATO BI editor had some problems when displaying rules with the pattern<br>
+"Create nodes based on a service search" -> "State of a service"
diff --git a/ChangeLog b/ChangeLog
index 59ec71b..3fb0a69 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -6,6 +6,9 @@
* 0764 lnx_quota: Added new check to monitor Linux File System Quota...
* 0740 FIX: winperf_if: now able to handle bandwidth > 4GBit...
+ BI:
+ * 0741 FIX: BI editor: fixed display bug in "Create nodes based on a service search"...
+
1.2.5i1:
Core & Setup:
diff --git a/web/htdocs/wato.py b/web/htdocs/wato.py
index b00ac70..9338fff 100644
--- a/web/htdocs/wato.py
+++ b/web/htdocs/wato.py
@@ -15089,7 +15089,8 @@ def bi_called_rule(node):
return subnode[1][0], info
elif node[0] == "foreach_service":
subnode = node[1][-1]
- return subnode[1][0], _("Called for each service...")
+ if subnode[0] == 'call':
+ return subnode[1][0], _("Called for each service...")
def count_bi_rule_references(aggregations, aggregation_rules, ruleid):
aggr_refs = 0
Module: check_mk
Branch: master
Commit: 67efa2f17f32dbb41ab9dd330f257a56b9896e5c
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=67efa2f17f32db…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Fri Mar 28 19:56:05 2014 +0100
lnx_quota: Added new check to monitor Linux File System Quota
This check monitors filesystems where linux user quotas has been
configured for users which exceed their space and file quotas.
---
.werks/764 | 9 +++++++++
ChangeLog | 1 +
2 files changed, 10 insertions(+)
diff --git a/.werks/764 b/.werks/764
new file mode 100644
index 0000000..df81538
--- /dev/null
+++ b/.werks/764
@@ -0,0 +1,9 @@
+Title: lnx_quota: Added new check to monitor Linux File System Quota
+Level: 1
+Component: checks
+Version: 1.2.5i2
+Date: 1396032940
+Class: feature
+
+This check monitors filesystems where linux user quotas has been
+configured for users which exceed their space and file quotas.
diff --git a/ChangeLog b/ChangeLog
index 13cca8f..59ec71b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -3,6 +3,7 @@
* 0147 enterasys_fans: New Check to monitor fans of enterasys swichtes
* 0774 ibm_svc_nodestats.diskio: new check for disk troughput per node on IBM SVC / V7000 devices
* 0775 ibm_svc_systemstats.diskio: new check for disk throughput in IBM SVC / V7000 devices in total
+ * 0764 lnx_quota: Added new check to monitor Linux File System Quota...
* 0740 FIX: winperf_if: now able to handle bandwidth > 4GBit...
Module: check_mk
Branch: master
Commit: 79547604b2d139d7ce6d601fe62fd0e9e4974128
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=79547604b2d139…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Fri Mar 28 19:55:30 2014 +0100
lnx_quota: Added new check to monitor Linux File System Quota
---
agents/plugins/lnx_quota | 6 +++
checkman/lnx_quota | 22 ++++++++++
checks/lnx_quota | 102 ++++++++++++++++++++++++++++++++++++++++++++++
3 files changed, 130 insertions(+)
diff --git a/agents/plugins/lnx_quota b/agents/plugins/lnx_quota
new file mode 100644
index 0000000..09fde34
--- /dev/null
+++ b/agents/plugins/lnx_quota
@@ -0,0 +1,6 @@
+#!/bin/bash
+echo "<<<lnx_quota>>>"
+for VOL in $(grep usrjquota /etc/fstab | cut -d' ' -f2); do
+ echo "[[[$VOL]]]"
+ repquota -up $VOL
+done
diff --git a/checkman/lnx_quota b/checkman/lnx_quota
new file mode 100644
index 0000000..2f236e5
--- /dev/null
+++ b/checkman/lnx_quota
@@ -0,0 +1,22 @@
+title: Linux File System Quotas
+agents: linux
+catalog: os/storage
+license: GPL
+distribution: check_mk
+description:
+ This check monitors filesystems where linux user quotas has been configured
+ for users which exceed their space and file quotas.
+
+ The check uses information provided by the Check_MK linux agent which are
+ available when the agent has been extended with the {lnx_quota} agent plugin.
+
+item:
+ The mountpoint of the filesystem
+
+perfdata:
+ Two values per user. {<user>_blocks} reports the currently allocated space
+ of the user in bytes and {<user>_files} reports the number of files currently
+ owned by the user.
+
+inventory:
+ Creates one check for each filesystem with enabled user quotas
diff --git a/checks/lnx_quota b/checks/lnx_quota
new file mode 100644
index 0000000..524c217
--- /dev/null
+++ b/checks/lnx_quota
@@ -0,0 +1,102 @@
+#!/usr/bin/python
+# -*- encoding: utf-8; py-indent-offset: 4 -*-
+# +------------------------------------------------------------------+
+# | ____ _ _ __ __ _ __ |
+# | / ___| |__ ___ ___| | __ | \/ | |/ / |
+# | | | | '_ \ / _ \/ __| |/ / | |\/| | ' / |
+# | | |___| | | | __/ (__| < | | | | . \ |
+# | \____|_| |_|\___|\___|_|\_\___|_| |_|_|\_\ |
+# | |
+# | Copyright Mathias Kettner 2013 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.
+
+def lnx_quota_parse(info):
+ parsed = {}
+ fs = None
+ for line in info:
+ if line[0].startswith('[[['):
+ # new filesystem
+ fs = line[0][3:-3]
+ parsed[fs] = {}
+ elif fs and len(line) == 10:
+ # new table entry
+ parsed[fs][line[0]] = map(int, line[2:])
+ return parsed
+
+def inventory_lnx_quota(info):
+ inv = []
+ for fs in lnx_quota_parse(info).keys():
+ inv.append((fs, {}))
+ return inv
+
+def check_lnx_quota(item, params, info):
+ parsed = lnx_quota_parse(info)
+ if item not in parsed:
+ return 3, 'Quota info not found for this filesystem'
+
+ state = 0
+ output = []
+ perfdata = []
+
+ fmt = lambda v, w: w == 'files' and '%d files' % v or get_bytes_human_readable(used*1000, 1000)
+
+ for user, values in parsed[item].items():
+ for what, (used, soft, hard, grace) in [
+ ('blocks', values[:4]),
+ ('files', values[4:]) ]:
+ if soft == 0 and hard == 0:
+ continue # skip entries with not-set limits
+
+ this_state = 0
+ txt = '%s %s' % (user, fmt(used, what))
+ if used > hard:
+ this_state = 2
+ txt += ' (over %s hard(!!))' % fmt(hard, what)
+ elif used > soft:
+ this_state = 1
+ txt += ' (over %s soft' % fmt(soft, what)
+ if grace != 0:
+ # user is or was in grace period
+ if grace <= time.time():
+ txt += ', grace exceeded(!!)'
+ this_state = 2
+ else:
+ txt += ', within grace(!)'
+ else:
+ txt += '(!)'
+ txt += ')'
+ # When users are in "ok" state, don't output their usage, just
+ # add the perfdata for them
+ if this_state:
+ output.append(txt)
+ state = max(state, this_state)
+
+ perfdata.append(('%s_%s' % (user, what), used*1000,
+ soft*1000, hard*1000, 0, hard*1000))
+
+ if not output:
+ output.append('All users are within quota')
+
+ return state, ', '.join(output), perfdata
+
+check_info['lnx_quota'] = {
+ 'check_function' : check_lnx_quota,
+ 'inventory_function' : inventory_lnx_quota,
+ 'service_description' : 'Quota %s',
+ 'has_perfdata' : True,
+ 'group' : 'quota',
+}
Module: check_mk
Branch: master
Commit: c8ee9de6e9e0f88fc09708d27a65ce665423b53d
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=c8ee9de6e9e0f8…
Author: Andreas Boesl <ab(a)mathias-kettner.de>
Date: Fri Mar 28 15:20:55 2014 +0100
FIX winperf_if: now able to handle display of bandwidth > 4GBit
If an interface had a bandwidth of > 4GBit the check did not receive
the correct bandwidth value, because of a 32 bit counter overflow.
Workaround: The windows plugin wmic_if.bat now also reports the correct bandwidth value.
If you use this plugin its bandwidth value will have precedence before the bandwidth determined by the agent.
---
.werks/740 | 11 +++++++++++
ChangeLog | 2 ++
agents/windows/plugins/wmic_if.bat | 2 +-
checks/winperf_if | 3 ++-
4 files changed, 16 insertions(+), 2 deletions(-)
diff --git a/.werks/740 b/.werks/740
new file mode 100644
index 0000000..504df72
--- /dev/null
+++ b/.werks/740
@@ -0,0 +1,11 @@
+Title: winperf_if: now able to handle display of bandwidth > 4GBit
+Level: 1
+Component: checks
+Version: 1.2.5i2
+Date: 1396016199
+Class: fix
+
+If an interface had a bandwidth of > 4GBit the check did not receive
+the correct bandwidth value, because of a 32 bit counter overflow.
+Workaround: The windows plugin wmic_if.bat now also reports the correct bandwidth value.
+If you use this plugin its bandwidth value will have precedence before the bandwidth determined by the agent.
diff --git a/ChangeLog b/ChangeLog
index 2cdf4e3..62c7302 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,8 @@
1.2.5i2:
Checks & Agents:
+ * 0147 enterasys_fans: New Check to monitor fans of enterasys swichtes
* 0774 ibm_svc_nodestats.diskio: new check for disk troughput per node on IBM SVC / V7000 devices
+ * 0740 FIX: winperf_if: now able to handle display of bandwidth > 4GBit...
1.2.5i1:
diff --git a/agents/windows/plugins/wmic_if.bat b/agents/windows/plugins/wmic_if.bat
index 501c892..2192d7e 100644
--- a/agents/windows/plugins/wmic_if.bat
+++ b/agents/windows/plugins/wmic_if.bat
@@ -1,3 +1,3 @@
@echo off
echo ^<^<^<winperf_if:sep^(44^)^>^>^>
-wmic path Win32_NetworkAdapter get macaddress,name,netconnectionid,netconnectionstatus /format:csv
+wmic path Win32_NetworkAdapter get speed,macaddress,name,netconnectionid,netconnectionstatus /format:csv
diff --git a/checks/winperf_if b/checks/winperf_if
index a7a7cf6..6035cc3 100644
--- a/checks/winperf_if
+++ b/checks/winperf_if
@@ -121,6 +121,7 @@ def convert_winperf_if(info):
for nr, nic_name in enumerate(nic_names):
nic = nics[nic_name]
mac_txt = nic.get('MACAddress')
+ bandwidth = saveint(nic.get('Speed'))
if mac_txt:
mac = "".join(map(lambda x: chr(int(x, 16)), mac_txt.split(':')))
else:
@@ -129,7 +130,7 @@ def convert_winperf_if(info):
str(nr + 1),
nic_name,
"loopback" in nic_name.lower() and '24' or '6',
- nic[10], # Aktuelle Bandbreite
+ bandwidth or nic[10], # Aktuelle Bandbreite
# NetConnectionStatus: 2 st up, 7 ist 'not connected'. If the plugin
# wmic_if is missing and we have link information we need to assume 'up':
nic.get('NetConnectionStatus', '2') == '2' and '1' or '2',
Module: check_mk
Branch: master
Commit: bbc4e718c9b023bdb588ee265c208a045d58646c
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=bbc4e718c9b023…
Author: Bernd Stroessenreuther <bs(a)mathias-kettner.de>
Date: Fri Mar 28 15:06:11 2014 +0100
fixed wording in check manpage of ibm_svc_nodestats.diskio
---
checkman/ibm_svc_nodestats.diskio | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/checkman/ibm_svc_nodestats.diskio b/checkman/ibm_svc_nodestats.diskio
index 79e1311..523c197 100644
--- a/checkman/ibm_svc_nodestats.diskio
+++ b/checkman/ibm_svc_nodestats.diskio
@@ -13,7 +13,7 @@ item:
"Drives", "MDisks" or "VDisks" plus the name of the node.
inventory:
- Creates one check for every Drive, MDisk or VDisk on every node.
+ Creates one check for Drives, one for MDisks and one for VDisks per node.
perfdata:
Two values: Throughput read and throughput write in Bytes/sec.