Module: check_mk
Branch: master
Commit: 2c7b54b2b955d6baf714722f2fa8434367a489c7
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=2c7b54b2b955d6…
Author: Florian Heigl <fh(a)mathias-kettner.de>
Date: Wed May 30 14:36:33 2012 +0200
Veritas Multipath: Remove bug from agent plugin
---
agents/plugins/veritas/vxvm_multipath | 16 ++++++----------
1 files changed, 6 insertions(+), 10 deletions(-)
diff --git a/agents/plugins/veritas/vxvm_multipath
b/agents/plugins/veritas/vxvm_multipath
index 7d69991..2155b04 100755
--- a/agents/plugins/veritas/vxvm_multipath
+++ b/agents/plugins/veritas/vxvm_multipath
@@ -1,19 +1,15 @@
-#!/bin/sh
+#!/bin/bash
# DMPNODENAME ENCLR-NAME STATE[A] PATH-TYPE[M]
# disk2057 emc1 ENABLED(A) -
# disk3119 emc_clariion0 ENABLED SECONDARY
-
-
-if type vxdmpadm >/dev/null; then
+if type vxdmpadm >/dev/null 2>&1 ; then
echo '<<<vxvm_multipath>>>'
- # dmpnode storagedevice state attribute
- #vxdmpadm getsubpaths| grep -vw DMPNODENAME | awk '{print $4" "$5"
"$2" "$3}'
- vxdmpadm listenclosure all | \
- grep -v -w -e ^[dD]isk -e ENCLR_NAME -e ^other_disks -e \^= | \
- awk '{print $1}' | while read enc ; do vxdmpadm getdmpnode
enclosure=$enc
- done
+ ENCS=$( vxdmpadm listenclosure all | grep -v -w -e ^[dD]isk -e ENCLR_NAME -e \^= |
awk '{print $1}')
+
+ echo "$ENCS" | while read enc ; do
+ vxdmpadm getdmpnode enclosure=$enc | grep -v -e \^= -e NAME
done
fi