diff options
Diffstat (limited to 'plugins-scripts/check_oracle.sh')
-rwxr-xr-x | plugins-scripts/check_oracle.sh | 5 |
1 files changed, 3 insertions, 2 deletions
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 @@ | |||
6 | # This Monitoring plugin was created to check Oracle status | 6 | # This Monitoring plugin was created to check Oracle status |
7 | # | 7 | # |
8 | 8 | ||
9 | PATH="@TRUSTED_PATH@" | ||
10 | export PATH | ||
9 | PROGNAME=`basename $0` | 11 | PROGNAME=`basename $0` |
10 | PROGPATH=`echo $0 | sed -e 's,[\\/][^\\/][^\\/]*$,,'` | 12 | PROGPATH=`echo $0 | sed -e 's,[\\/][^\\/][^\\/]*$,,'` |
11 | REVISION="@NP_VERSION@" | 13 | REVISION="@NP_VERSION@" |
12 | PATH="@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 |