Module: check_mk
Branch: master
Commit: 752396a0e7b5285818a3299788fb7fe7d490233e
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=752396a0e7b528…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Tue Dec 17 16:23:55 2013 +0100
FIX nfsmounts: correctly handle mount points with spaces
If you have a space in the name of your <b>moint point</b> (not in the name
of the export) then the Linux agent would show this mount point always as
<tt>hanging</tt>. The reason is that in <tt>/proc/mounts</tt> spaces are
displayed as <tt>\040</tt>. This has now been fixed in the agent, which
outputs spaces correctly. Also the according check has been modified so that
it can deal with spaces in the names of the mount points.
---
.werks/350 | 15 +++++++++++++++
ChangeLog | 1 +
agents/check_mk_agent.linux | 1 +
checks/nfsmounts | 16 ++++++++++------
4 files changed, 27 insertions(+), 6 deletions(-)
diff --git a/.werks/350 b/.werks/350
new file mode 100644
index 0000000..f3d4647
--- /dev/null
+++ b/.werks/350
@@ -0,0 +1,15 @@
+Title: nfsmounts: correctly handle mount points with spaces
+Level: 1
+Component: checks
+Class: fix
+State: unknown
+Version: 1.2.5i1
+Date: 1387293636
+Targetversion: future
+
+If you have a space in the name of your <b>moint point</b> (not in the name
+of the export) then the Linux agent would show this mount point always as
+<tt>hanging</tt>. The reason is that in <tt>/proc/mounts</tt> spaces are
+displayed as <tt>\040</tt>. This has now been fixed in the agent, which
+outputs spaces correctly. Also the according check has been modified so that
+it can deal with spaces in the names of the mount points.
diff --git a/ChangeLog b/ChangeLog
index c67a9ac..d0b1e3c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -56,6 +56,7 @@
* 0383 FIX: solaris_mem: Is now compatible to more systems...
* 0109 FIX: cisco_fantray: Prevent inventory for not available fans
* 0110 FIX: cisco_fru_power: Prevent inventory for not available FRUs
+ * 0350 FIX: nfsmounts: correctly handle mount points with spaces...
Multisite:
* 0371 Added log class filter to hostsvcevents view
diff --git a/agents/check_mk_agent.linux b/agents/check_mk_agent.linux
index 2f67328..7c24e92 100755
--- a/agents/check_mk_agent.linux
+++ b/agents/check_mk_agent.linux
@@ -138,6 +138,7 @@ then
echo '<<<nfsmounts>>>'
sed -n '/ nfs4\? /s/[^ ]* \([^ ]*\) .*/\1/p' < /proc/mounts |
+ sed 's/\\040/ /g' |
while read MP
do
if [ $STAT_VERSION != $STAT_BROKE ]; then
diff --git a/checks/nfsmounts b/checks/nfsmounts
index 60df36b..e86cfa7 100644
--- a/checks/nfsmounts
+++ b/checks/nfsmounts
@@ -24,22 +24,26 @@
# to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
# Boston, MA 02110-1301 USA.
+# Example out from agent:
+# <<<nfsmounts>>>
+# /foobar hanging 0 0 0 0
+# /with spaces ok 217492 123563 112515 524288
def inventory_nfsmounts(info):
- return [ (line[0], None) for line in info ]
+ return [ (" ".join(line[:-5]), None) for line in info ]
def check_nfsmounts(item, _no_params, info):
for line in info:
- mountpoint = line[0]
+ mountpoint = " ".join(line[:-5])
if mountpoint == item:
- size_blocks = int(line[2])
- free_blocks = int(line[4]) # for non-root user
- blocksize = int(line[5])
+ size_blocks = int(line[-4])
+ free_blocks = int(line[-2]) # for non-root user
+ blocksize = int(line[-1])
if size_blocks < 0 or free_blocks < 0 or blocksize > 1024*1024:
return (2, "Stale NFS handle")
- if line[1] == 'ok':
+ if line[-5] == 'ok':
gb = 1024 * 1024 * 1024.0
size_gb = (size_blocks * blocksize) / gb
if size_gb == 0:
Module: check_mk
Branch: master
Commit: 7e86b399dce8819bed1235eb16741120d5217c6e
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=7e86b399dce881…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Tue Dec 17 16:10:42 2013 +0100
cisco_fantray: fixed new syntax error
---
ChangeLog | 4 ++--
checks/cisco_fantray | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 13ba59a..c67a9ac 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -52,10 +52,10 @@
* 0380 FIX: jolokia_metrics.mem: PNP-Template now handles non existant max values...
* 0381 FIX: win_printers: Fixed creation of duplicate services...
* 0347 FIX: smart.stats: Remove duplicate disks...
- * 0109 FIX: cisco_fantray: Prevent inventory for not available fans
- * 0110 FIX: cisco_fru_power: Prevent inventory for not available FRUs
* 0349 FIX: winperf.cpuusage: update man page: this check is deprecated
* 0383 FIX: solaris_mem: Is now compatible to more systems...
+ * 0109 FIX: cisco_fantray: Prevent inventory for not available fans
+ * 0110 FIX: cisco_fru_power: Prevent inventory for not available FRUs
Multisite:
* 0371 Added log class filter to hostsvcevents view
diff --git a/checks/cisco_fantray b/checks/cisco_fantray
index 3ea17e1..6c3fc18 100644
--- a/checks/cisco_fantray
+++ b/checks/cisco_fantray
@@ -30,7 +30,7 @@ def inventory_cisco_fantray(info):
if info and info[0]:
#Some Cisco switches reporting not available fans as down,
#so we cant invenorize fans reported as down
- return [ (line[0], None) for line in info if line[1] != '3'
+ return [ (line[0], None) for line in info if line[1] != '3' ]
def check_cisco_fantray(item, params, info):
for line in info:
Module: check_mk
Branch: master
Commit: e7e664d2b7c08f83f138c4e8747d7bb1c2df7177
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=e7e664d2b7c08f…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Tue Dec 17 13:39:05 2013 +0100
Updated bug entries #2100
---
.bugs/2100 | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/.bugs/2100 b/.bugs/2100
new file mode 100644
index 0000000..6d1602b
--- /dev/null
+++ b/.bugs/2100
@@ -0,0 +1,8 @@
+Title: OpenLDAP: Group sync seems broken
+Component: multisite
+State: open
+Date: 2013-12-17 13:38:38
+Targetversion: 1.2.4
+Class: bug
+
+Groups are not synced anymore. The search-filter on the distinguishedName does not work in Openldap, nor can "dn" be used in a searchfilter.