summaryrefslogtreecommitdiffstats
path: root/web/attachments/274975-check_oracle.patch
blob: 98eeced3fb7185166e191bc743804809a0e4dcfa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
--- plugins-scripts/check_oracle.sh.old	2008-04-17 15:59:40.807652000 -0400
+++ plugins-scripts/check_oracle.sh	2008-04-17 16:15:15.641727000 -0400
@@ -37,7 +37,7 @@
   echo "--db SID"
   echo "   Check local database (search /bin/ps for PMON process) and check"
   echo "   filesystem for sgadefORACLE_SID.dbf"
-  echo "--login SID"
+  echo "--login SID|<IP or hostname> SID"
   echo "   Attempt a dummy login and alert if not ORA-01017: invalid username/password"
   echo "--cache"
   echo "   Check local database for library and buffer cache hit ratios"
@@ -176,7 +176,11 @@
     fi
     ;;
 --login)
-    loginchk=`sqlplus dummy/user@$2 < /dev/null`
+    if [ -n "$3" ]; then
+	    loginchk=`sqlplus dummy/user@$2/$3 < /dev/null`
+    else
+            loginchk=`sqlplus dummy/user@$2 < /dev/null`
+    fi
     loginchk2=` echo  $loginchk | grep -c ORA-01017`
     if [ ${loginchk2} -eq 1 ] ; then 
 	echo "OK - dummy login connected"