summaryrefslogtreecommitdiffstats
path: root/plugins-scripts
diff options
context:
space:
mode:
Diffstat (limited to 'plugins-scripts')
-rwxr-xr-xplugins-scripts/check_oracle.sh35
1 files changed, 16 insertions, 19 deletions
diff --git a/plugins-scripts/check_oracle.sh b/plugins-scripts/check_oracle.sh
index 998899b9..3064db90 100755
--- a/plugins-scripts/check_oracle.sh
+++ b/plugins-scripts/check_oracle.sh
@@ -18,12 +18,6 @@
18# I have the script checking for the Oracle PMON process and 18# I have the script checking for the Oracle PMON process and
19# the sgadefORACLE_SID.dbf file. 19# the sgadefORACLE_SID.dbf file.
20# 20#
21#
22# If you have any problems check that you have the $ORACLE_HOME
23# enviroment variable set, have $ORACLE_HOME/bin in your PATH, and
24# dont forget about your tnsnames.ora file. when checking Local
25# Database status your ORACLE_SID is case sensitive.
26#
27 21
28PROGNAME=`basename $0` 22PROGNAME=`basename $0`
29PROGPATH=`echo $0 | sed -e 's,[\\/][^\\/][^\\/]*$,,'` 23PROGPATH=`echo $0 | sed -e 's,[\\/][^\\/][^\\/]*$,,'`
@@ -45,17 +39,17 @@ print_usage() {
45} 39}
46 40
47print_help() { 41print_help() {
48 print_revision $PROGNAME $REVISION 42 print_revision $PROGNAME $REVISION
49 echo "" 43 echo ""
50 print_usage 44 print_usage
51 echo "" 45 echo ""
52 echo "Check remote or local TNS status and check local Database status" 46 echo "Check remote or local TNS status and check local Database status"
53 echo "" 47 echo ""
54 echo "--tns=SID/IP Address" 48 echo "--tns=SID/IP Address"
55 echo " Check remote TNS server" 49 echo " Check remote TNS server"
56 echo "--db=SID" 50 echo "--db=SID"
57 echo " Check local database (search /bin/ps for PMON process and check" 51 echo " Check local database (search /bin/ps for PMON process and check"
58 echo " filesystem for sgadefORACLE_SID.dbf" 52 echo " filesystem for sgadefORACLE_SID.dbf"
59 echo "--login=SID" 53 echo "--login=SID"
60 echo " Attempt a dummy login and alert if not ORA-01017: invalid username/password" 54 echo " Attempt a dummy login and alert if not ORA-01017: invalid username/password"
61 echo "--cache" 55 echo "--cache"
@@ -69,17 +63,20 @@ print_help() {
69 echo "--oranames=Hostname" 63 echo "--oranames=Hostname"
70 echo " Check remote Oracle Names server" 64 echo " Check remote Oracle Names server"
71 echo "--help" 65 echo "--help"
72 echo " Print this help screen" 66 echo " Print this help screen"
73 echo "--version" 67 echo "--version"
74 echo " Print version and license information" 68 echo " Print version and license information"
75 echo "" 69 echo ""
76 echo "If the plugin doesn't work, check that the ORACLE_HOME environment" 70 echo "If the plugin doesn't work, check that the ORACLE_HOME environment"
77 echo "variable is set, that ORACLE_HOME/bin is in your PATH, and the" 71 echo "variable is set, that ORACLE_HOME/bin is in your PATH, and the"
78 echo "tnsnames.ora file is locatable and is properly configured." 72 echo "tnsnames.ora file is locatable and is properly configured."
79 echo "" 73 echo ""
80 echo "When checking Local Database status your ORACLE_SID is case sensitive." 74 echo "When checking Local Database status your ORACLE_SID is case sensitive."
81 echo "" 75 echo ""
82 support 76 echo "If you want to use a default Oracle home, add in your oratab file:"
77 echo "*:/opt/app/oracle/product/7.3.4:N"
78 echo ""
79 support
83} 80}
84 81
85case "$1" in 82case "$1" in
@@ -123,7 +120,7 @@ if [ -z "$ORACLE_HOME" ] ; then
123 ORACLE_HOME=`IFS=: 120 ORACLE_HOME=`IFS=:
124 while read SID ORACLE_HOME junk; 121 while read SID ORACLE_HOME junk;
125 do 122 do
126 if [ "$SID" = "$2" ] ; then 123 if [ "$SID" = "$2" -o "$SID" = "*" ] ; then
127 echo $ORACLE_HOME; 124 echo $ORACLE_HOME;
128 exit; 125 exit;
129 fi; 126 fi;