Module: check_mk
Branch: master
Commit: ca3a087f8306529490afebd060500c1556d5a7f1
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=ca3a087f830652…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Sun Aug 24 11:09:39 2014 +0200
Removed some trailing spaces
---
agents/plugins/hpux_lunstats | 4 +-
agents/plugins/hpux_statgrab | 6 +-
agents/plugins/mk_oracle.solaris | 14 ++---
agents/plugins/nfsexports.solaris | 114 ++++++++++++++++++-------------------
4 files changed, 69 insertions(+), 69 deletions(-)
diff --git a/agents/plugins/hpux_lunstats b/agents/plugins/hpux_lunstats
index e7e5cbb..822ddfd 100644
--- a/agents/plugins/hpux_lunstats
+++ b/agents/plugins/hpux_lunstats
@@ -1,8 +1,8 @@
#!/usr/bin/ksh
# Put this file into /usr/lib/check_mk_agent/plugins. Then
-# reinventorize your host.
-# Actually querying these stats is quite slow since they freshly update
+# reinventorize your host.
+# Actually querying these stats is quite slow since they freshly update
# on each call. If you have a few 1000 luns then this will not work.
get_stats()
diff --git a/agents/plugins/hpux_statgrab b/agents/plugins/hpux_statgrab
index f0a1a29..b054173 100644
--- a/agents/plugins/hpux_statgrab
+++ b/agents/plugins/hpux_statgrab
@@ -14,10 +14,10 @@ if which statgrab > /dev/null ; then
echo "<<<statgrab_$s>>>"
cat /tmp/statgrab.$$ | grep "^$s\." | cut -d. -f2-99 | sed 's/
*= */ /'
done
-
+
echo '<<<statgrab_mem>>>'
cat /tmp/statgrab.$$ | egrep "^(swap|mem)\." | sed 's/ *= */
/'
-
+
fi
[ -f /tmp/statgrab.$$ ] && rm -f /tmp/statgrab.$$
-fi
+fi
diff --git a/agents/plugins/mk_oracle.solaris b/agents/plugins/mk_oracle.solaris
index 194fda9..a21276d 100644
--- a/agents/plugins/mk_oracle.solaris
+++ b/agents/plugins/mk_oracle.solaris
@@ -30,7 +30,7 @@
# Get list of all running databases
SIDS=$(UNIX95=true ps -ef -o args | sed -n '/^ora_pmon_/p;/^xe_pmon_/p' | sed -n
'/^[a-z]*_pmon_\([^ ]*\)/s//\1/p')
-if [ -z "$SIDS" ] ; then
+if [ -z "$SIDS" ] ; then
# If on this system we've already found a database
if [ -e "$MK_CONFDIR/mk_oracle.found" ] ; then
echo '<<<oracle_version>>>'
@@ -56,7 +56,7 @@ then
fi
# You can specify a list of SIDs to monitor. Those databases will
-# only be handled, if they are found running, though!
+# only be handled, if they are found running, though!
#
# ONLY_SIDS="XE HIRN SEPP"
#
@@ -103,11 +103,11 @@ for SID in $SIDS; do
if [ "$S" = "$SID" ] ; then
SKIP=
break
- fi
+ fi
done
if [ "$SKIP" ] ; then continue ; fi
fi
-
+
EXCLUDE=EXCLUDE_$SID
EXCLUDE=${!EXCLUDE}
# SID filtered totally?
@@ -135,11 +135,11 @@ for SID in $SIDS; do
fi
# If the cache file exists, output it, regardless of its age. If it's outdated
- # then it will be recreated *asynchronously*. It's new contents will not
+ # then it will be recreated *asynchronously*. It's new contents will not
# be available here anyway.
if [ -s "$CACHE_FILE" ] ; then cat "$CACHE_FILE" ; fi
- # When the cache file is not valid, we recreated it, but only if there is not
+ # When the cache file is not valid, we recreated it, but only if there is not
# yet a background process from a previous check still doing this! We see this
# because of the existance of the .new file
# When the cache is old and there is no *new file present, then start a query
@@ -193,7 +193,7 @@ for SID in $SIDS; do
f.autoextensible, f.blocks, f.maxblocks, f.user_blocks, f.increment_by,
'TEMP', t.block_size, t.status;
EOF
- fi
+ fi
} > $CACHE_FILE.new && mv $CACHE_FILE.new $CACHE_FILE || rm -f
$CACHE_FILE*
"
fi
diff --git a/agents/plugins/nfsexports.solaris b/agents/plugins/nfsexports.solaris
index c953a08..fb180a3 100644
--- a/agents/plugins/nfsexports.solaris
+++ b/agents/plugins/nfsexports.solaris
@@ -1,57 +1,57 @@
-#!/usr/bin/bash
-# +------------------------------------------------------------------+
-# | ____ _ _ __ __ _ __ |
-# | / ___| |__ ___ ___| | __ | \/ | |/ / |
-# | | | | '_ \ / _ \/ __| |/ / | |\/| | ' / |
-# | | |___| | | | __/ (__| < | | | | . \ |
-# | \____|_| |_|\___|\___|_|\_\___|_| |_|_|\_\ |
-# | |
-# | 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.
-
-# Check_MK agent plugin for monitoring nfsexports on Solaris. This plugin
-# has been tested with solaris 10 in a standalone and cluster setting.
-
-clusterconfigdir="/etc/cluster/ccr/global/directory"
-if [ -r $clusterconfigdir ]; then
- # is a clustered nfs server
- nfsconfig=/etc/cluster/ccr/global/`grep rgm $clusterconfigdir | grep nfs | grep
rg_`
- if [ -r $nsconfig ]; then
- Pathprefix=`grep Pathprefix $nfsconfig | awk {'print $2'}`/SUNW.nfs
- dfstabfile=$Pathprefix/dfstab.`grep -v FilesystemMountPoints $nfsconfig | grep
SUNW.nfs | \
- awk {'print $1'} | sed -e 's/RS_//'`
- if [ -r $dfstabfile ]; then
- EXPORTS=`grep -v ^# $dfstabfile | grep -v ^$`
- ps -aef | grep nfsd | grep $Pathprefix >/dev/null &&
DAEMONS="ok"
- fi
- fi
-else
- # is a standalone nfs server
- dfstabfile="/etc/dfs/dfstab"
- if [ -r $dfstabfile ]; then
- EXPORTS=`grep -v ^# $dfstabfile | grep -v ^$`
- svcs -a | grep nfs/server | grep ^online >/dev/null &&
DAEMONS="ok"
- fi
-fi
-
-# any exports or have running daemons? then look for registered exports
-if [ "$EXPORTS" ]; then
- echo "<<<nfsexports>>>"
- if [ "$DAEMONS" ]; then
- showmount -e | grep ^/
- fi
-fi
+#!/usr/bin/bash
+# +------------------------------------------------------------------+
+# | ____ _ _ __ __ _ __ |
+# | / ___| |__ ___ ___| | __ | \/ | |/ / |
+# | | | | '_ \ / _ \/ __| |/ / | |\/| | ' / |
+# | | |___| | | | __/ (__| < | | | | . \ |
+# | \____|_| |_|\___|\___|_|\_\___|_| |_|_|\_\ |
+# | |
+# | 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.
+
+# Check_MK agent plugin for monitoring nfsexports on Solaris. This plugin
+# has been tested with solaris 10 in a standalone and cluster setting.
+
+clusterconfigdir="/etc/cluster/ccr/global/directory"
+if [ -r $clusterconfigdir ]; then
+ # is a clustered nfs server
+ nfsconfig=/etc/cluster/ccr/global/`grep rgm $clusterconfigdir | grep nfs | grep rg_`
+ if [ -r $nsconfig ]; then
+ Pathprefix=`grep Pathprefix $nfsconfig | awk {'print $2'}`/SUNW.nfs
+ dfstabfile=$Pathprefix/dfstab.`grep -v FilesystemMountPoints $nfsconfig | grep
SUNW.nfs | \
+ awk {'print $1'} | sed -e 's/RS_//'`
+ if [ -r $dfstabfile ]; then
+ EXPORTS=`grep -v ^# $dfstabfile | grep -v ^$`
+ ps -aef | grep nfsd | grep $Pathprefix >/dev/null &&
DAEMONS="ok"
+ fi
+ fi
+else
+ # is a standalone nfs server
+ dfstabfile="/etc/dfs/dfstab"
+ if [ -r $dfstabfile ]; then
+ EXPORTS=`grep -v ^# $dfstabfile | grep -v ^$`
+ svcs -a | grep nfs/server | grep ^online >/dev/null &&
DAEMONS="ok"
+ fi
+fi
+
+# any exports or have running daemons? then look for registered exports
+if [ "$EXPORTS" ]; then
+ echo "<<<nfsexports>>>"
+ if [ "$DAEMONS" ]; then
+ showmount -e | grep ^/
+ fi
+fi