aboutsummaryrefslogtreecommitdiff
path: root/plugins-scripts
diff options
context:
space:
mode:
authorGravatar Jan Wagner <waja@cyconet.org> 2014-10-06 10:25:31 +0200
committerGravatar Jan Wagner <waja@cyconet.org> 2014-10-06 10:25:31 +0200
commit93071168df90cd71ecb0cd391923cb4cc7de8d3d (patch)
tree577dc81b76783b0b1bb885fe5a94b2af02818a9b /plugins-scripts
parent4034419bebf1ff0b83596e109218d3682d23d874 (diff)
parent6100950329ff28ba52fa16b67539687efcb1ff08 (diff)
downloadmonitoring-plugins-93071168df90cd71ecb0cd391923cb4cc7de8d3d.tar.gz
Merge branch 'maint'
Conflicts: NEWS THANKS.in
Diffstat (limited to 'plugins-scripts')
-rwxr-xr-xplugins-scripts/check_log.sh7
-rwxr-xr-xplugins-scripts/check_mailq.pl4
-rwxr-xr-xplugins-scripts/check_oracle.sh5
-rwxr-xr-xplugins-scripts/check_sensors.sh5
4 files changed, 10 insertions, 11 deletions
diff --git a/plugins-scripts/check_log.sh b/plugins-scripts/check_log.sh
index 8653a5e1..d28c8d0a 100755
--- a/plugins-scripts/check_log.sh
+++ b/plugins-scripts/check_log.sh
@@ -58,12 +58,11 @@
# Paths to commands used in this script. These
# may have to be modified to match your system setup.
-PROGNAME=`/bin/basename $0`
-PROGPATH=`echo $0 | sed -e 's,[\\/][^\\/][^\\/]*$,,'`
-REVISION="@NP_VERSION@"
PATH="@TRUSTED_PATH@"
-
export PATH
+PROGNAME=`basename $0`
+PROGPATH=`echo $0 | sed -e 's,[\\/][^\\/][^\\/]*$,,'`
+REVISION="@NP_VERSION@"
. $PROGPATH/utils.sh
diff --git a/plugins-scripts/check_mailq.pl b/plugins-scripts/check_mailq.pl
index bd78981e..0e8100d0 100755
--- a/plugins-scripts/check_mailq.pl
+++ b/plugins-scripts/check_mailq.pl
@@ -332,7 +332,7 @@ elsif ( $mailq eq "postfix" ) {
}elsif ($lines[0]=~/Mail queue is empty/) {
$msg_q = 0;
}else{
- print "Couldn't match $utils::PATH_TO_QMAIL_QSTAT output\n";
+ print "Couldn't match $utils::PATH_TO_MAILQ output\n";
exit $ERRORS{'UNKNOWN'};
}
@@ -340,7 +340,7 @@ elsif ( $mailq eq "postfix" ) {
#if ($lines[1]=~/^messages in queue but not yet preprocessed: (\d+)/) {
# my $msg_p = $1;
#}else{
- # print "Couldn't match $utils::PATH_TO_QMAIL_QSTAT output\n";
+ # print "Couldn't match $utils::PATH_TO_MAILQ output\n";
# exit $ERRORS{'UNKNOWN'};
#}
diff --git a/plugins-scripts/check_oracle.sh b/plugins-scripts/check_oracle.sh
index ceac95dc..96078aca 100755
--- a/plugins-scripts/check_oracle.sh
+++ b/plugins-scripts/check_oracle.sh
@@ -6,10 +6,11 @@
# This Monitoring plugin was created to check Oracle status
#
+PATH="@TRUSTED_PATH@"
+export PATH
PROGNAME=`basename $0`
PROGPATH=`echo $0 | sed -e 's,[\\/][^\\/][^\\/]*$,,'`
REVISION="@NP_VERSION@"
-PATH="@TRUSTED_PATH@"
. $PROGPATH/utils.sh
@@ -137,7 +138,7 @@ case "$cmd" in
tnschk=` tnsping $2`
tnschk2=` echo $tnschk | grep -c OK`
if [ ${tnschk2} -eq 1 ] ; then
- tnschk3=` echo $tnschk | sed -e 's/.*(//' -e 's/).*//'`
+ tnschk3=${tnschk##*(}; tnschk3=${tnschk3%)*}
echo "OK - reply time ${tnschk3} from $2"
exit $STATE_OK
else
diff --git a/plugins-scripts/check_sensors.sh b/plugins-scripts/check_sensors.sh
index 05c64c48..f7428301 100755
--- a/plugins-scripts/check_sensors.sh
+++ b/plugins-scripts/check_sensors.sh
@@ -1,11 +1,10 @@
#!/bin/sh
+PATH="@TRUSTED_PATH@"
+export PATH
PROGNAME=`basename $0`
PROGPATH=`echo $0 | sed -e 's,[\\/][^\\/][^\\/]*$,,'`
REVISION="@NP_VERSION@"
-PATH="@TRUSTED_PATH@"
-
-export PATH
. $PROGPATH/utils.sh