summaryrefslogtreecommitdiffstats
path: root/plugins-scripts/check_oracle.sh
diff options
context:
space:
mode:
authorJan Wagner <waja@cyconet.org>2014-10-06 08:25:31 (GMT)
committerJan Wagner <waja@cyconet.org>2014-10-06 08:25:31 (GMT)
commit93071168df90cd71ecb0cd391923cb4cc7de8d3d (patch)
tree577dc81b76783b0b1bb885fe5a94b2af02818a9b /plugins-scripts/check_oracle.sh
parent4034419bebf1ff0b83596e109218d3682d23d874 (diff)
parent6100950329ff28ba52fa16b67539687efcb1ff08 (diff)
downloadmonitoring-plugins-93071168df90cd71ecb0cd391923cb4cc7de8d3d.tar.gz
Merge branch 'maint'
Conflicts: NEWS THANKS.in
Diffstat (limited to 'plugins-scripts/check_oracle.sh')
-rwxr-xr-xplugins-scripts/check_oracle.sh5
1 files changed, 3 insertions, 2 deletions
diff --git a/plugins-scripts/check_oracle.sh b/plugins-scripts/check_oracle.sh
index ceac95d..96078ac 100755
--- a/plugins-scripts/check_oracle.sh
+++ b/plugins-scripts/check_oracle.sh
@@ -6,10 +6,11 @@
6# This Monitoring plugin was created to check Oracle status 6# This Monitoring plugin was created to check Oracle status
7# 7#
8 8
9PATH="@TRUSTED_PATH@"
10export PATH
9PROGNAME=`basename $0` 11PROGNAME=`basename $0`
10PROGPATH=`echo $0 | sed -e 's,[\\/][^\\/][^\\/]*$,,'` 12PROGPATH=`echo $0 | sed -e 's,[\\/][^\\/][^\\/]*$,,'`
11REVISION="@NP_VERSION@" 13REVISION="@NP_VERSION@"
12PATH="@TRUSTED_PATH@"
13 14
14. $PROGPATH/utils.sh 15. $PROGPATH/utils.sh
15 16
@@ -137,7 +138,7 @@ case "$cmd" in
137 tnschk=` tnsping $2` 138 tnschk=` tnsping $2`
138 tnschk2=` echo $tnschk | grep -c OK` 139 tnschk2=` echo $tnschk | grep -c OK`
139 if [ ${tnschk2} -eq 1 ] ; then 140 if [ ${tnschk2} -eq 1 ] ; then
140 tnschk3=` echo $tnschk | sed -e 's/.*(//' -e 's/).*//'` 141 tnschk3=${tnschk##*(}; tnschk3=${tnschk3%)*}
141 echo "OK - reply time ${tnschk3} from $2" 142 echo "OK - reply time ${tnschk3} from $2"
142 exit $STATE_OK 143 exit $STATE_OK
143 else 144 else