summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 704b1e2)
raw | patch | inline | side by side (parent: 704b1e2)
author | Ton Voon <tonvoon@users.sourceforge.net> | |
Mon, 17 Mar 2003 22:24:30 +0000 (22:24 +0000) | ||
committer | Ton Voon <tonvoon@users.sourceforge.net> | |
Mon, 17 Mar 2003 22:24:30 +0000 (22:24 +0000) |
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@428 f882894a-f735-0410-b71e-b25c423dba1c
plugins-scripts/check_oracle.sh | patch | blob | history |
index 998899b91ac2a6e05fa58e674562d4ae56dd20a9..3064db90bddd46c3c255079d149b6532dd4f979f 100755 (executable)
# I have the script checking for the Oracle PMON process and
# the sgadefORACLE_SID.dbf file.
#
-#
-# If you have any problems check that you have the $ORACLE_HOME
-# enviroment variable set, have $ORACLE_HOME/bin in your PATH, and
-# dont forget about your tnsnames.ora file. when checking Local
-# Database status your ORACLE_SID is case sensitive.
-#
PROGNAME=`basename $0`
PROGPATH=`echo $0 | sed -e 's,[\\/][^\\/][^\\/]*$,,'`
}
print_help() {
- print_revision $PROGNAME $REVISION
- echo ""
- print_usage
- echo ""
- echo "Check remote or local TNS status and check local Database status"
- echo ""
+ print_revision $PROGNAME $REVISION
+ echo ""
+ print_usage
+ echo ""
+ echo "Check remote or local TNS status and check local Database status"
+ echo ""
echo "--tns=SID/IP Address"
echo " Check remote TNS server"
echo "--db=SID"
echo " Check local database (search /bin/ps for PMON process and check"
- echo " filesystem for sgadefORACLE_SID.dbf"
+ echo " filesystem for sgadefORACLE_SID.dbf"
echo "--login=SID"
echo " Attempt a dummy login and alert if not ORA-01017: invalid username/password"
echo "--cache"
echo "--oranames=Hostname"
echo " Check remote Oracle Names server"
echo "--help"
- echo " Print this help screen"
+ echo " Print this help screen"
echo "--version"
- echo " Print version and license information"
- echo ""
+ echo " Print version and license information"
+ echo ""
echo "If the plugin doesn't work, check that the ORACLE_HOME environment"
- echo "variable is set, that ORACLE_HOME/bin is in your PATH, and the"
+ echo "variable is set, that ORACLE_HOME/bin is in your PATH, and the"
echo "tnsnames.ora file is locatable and is properly configured."
echo ""
echo "When checking Local Database status your ORACLE_SID is case sensitive."
echo ""
- support
+ echo "If you want to use a default Oracle home, add in your oratab file:"
+ echo "*:/opt/app/oracle/product/7.3.4:N"
+ echo ""
+ support
}
case "$1" in
ORACLE_HOME=`IFS=:
while read SID ORACLE_HOME junk;
do
- if [ "$SID" = "$2" ] ; then
+ if [ "$SID" = "$2" -o "$SID" = "*" ] ; then
echo $ORACLE_HOME;
exit;
fi;