diff options
| author | Jan Wagner <waja@cyconet.org> | 2014-10-06 10:25:31 +0200 |
|---|---|---|
| committer | Jan Wagner <waja@cyconet.org> | 2014-10-06 10:25:31 +0200 |
| commit | 93071168df90cd71ecb0cd391923cb4cc7de8d3d (patch) | |
| tree | 577dc81b76783b0b1bb885fe5a94b2af02818a9b /plugins-scripts/check_oracle.sh | |
| parent | 4034419bebf1ff0b83596e109218d3682d23d874 (diff) | |
| parent | 6100950329ff28ba52fa16b67539687efcb1ff08 (diff) | |
| download | monitoring-plugins-93071168df90cd71ecb0cd391923cb4cc7de8d3d.tar.gz | |
Merge branch 'maint'
Conflicts:
NEWS
THANKS.in
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 |
