HealthCheck

APPS Health Check

Posted on July 30, 2007. Filed under: HealthCheck |

Many a times we would have faced situations wherein we had to perform health checks for multiple instances especially during mass outages. DBA’s working on hosted services will understand better what iam referring to. Have you ever thought of or thinking of a script which will request for the URL & the sysadmin password once, ONLY ONCE and perform 7 checks at a same time.

Below is a simple html page which performs below tests

1) Generic Login Check
2) JTF Login Check
3) Servlets Check
4) OAM Login Check
5) Discoverer Viewer Check
6) Discoverer Launch Check
7) Forms (dev60cgi/f60cgi) Check

The script opens seven different windows for the above tests.

Login Screen

healthcheckloginpage.jpg
Code

————————————————————–

<html>
<head>
<title>Oracle APPS Health Check – Powered by OraclePitStop</title>
<script type=”text/javascript”>

function launch()
{

var htp_v = document.details.http_t.value;
var hst_v = document.details.hostname_t.value;
var dmn_v = document.details.domain_t.value;
var prt_v = document.details.port_t.value;
var usr_v = document.details.i_1.value;
var pwd_v = document.details.i_2.value;
var sid_v = document.details.sid_t.value;

full_url=htp_v+”://”+hst_v+”.”+dmn_v+”:”+prt_v;
pls_url=htp_v+”://”+hst_v+”.”+dmn_v+”:”+prt_v+”/pls/”+sid_v+”/oraclemypage.home”;
home_url=htp_v+”://”+hst_v+”.”+dmn_v+”:”+prt_v+”/OA_HTML/US/ICXINDEX_”+sid_v+”_”+hst_v+”.htm”;
aplogon_url=pls_url+”?i_1=”+usr_v+”&i_2=”+pwd_v+”&rmode=2&home_url=”+home_url;
discovi_url=htp_v+”://”+hst_v+”.”+dmn_v+”:”+prt_v+”/discoverer4i/viewer?us=”+usr_v+”&pw=”+pwd_v+”&db=”+sid_v;
jtflogn_url=htp_v+”://”+hst_v+”.”+dmn_v+”:”+prt_v+”/OA_HTML/jtflogin.jsp?username=”+usr_v;
oamlogn_url=htp_v+”://”+hst_v+”.”+dmn_v+”:”+prt_v+”/servlets/weboam/oam/oamLogin”
servlet_url=htp_v+”://”+hst_v+”.”+dmn_v+”:”+prt_v+”/servlets/Hello”
discopl_url=htp_v+”://”+hst_v+”.”+dmn_v+”:”+prt_v+”/discwb4/html/discolaunch.htm”
dev60cg_url=htp_v+”://”+hst_v+”.”+dmn_v+”:”+prt_v+”/dev60cgi/f60cgi”

window.open(aplogon_url,’Aplogon’,’left=0,top=0,width=500,height=200,toolbar=1,resizable=1,scrollbars=1′);
window.open(jtflogn_url,’JTFLogin’,’left=510,top=0,width=500,height=200,toolbar=1,resizable=1,scrollbars=1′);
window.open(oamlogn_url,’OAMlogin’,’left=0,top=200,width=500,height=200,toolbar=1,resizable=1,scrollbars=1′);
window.open(servlet_url,’Servlets’,’left=510,top=200,width=500,height=200,toolbar=1,resizable=1,scrollbars=1′);
window.open(discovi_url,’Discovi’,’left=0,top=400,width=500,height=170,toolbar=1,resizable=1,scrollbars=1′);
window.open(discopl_url,’discopl’,’left=510,top=400,width=500,height=170,toolbar=1,resizable=1,scrollbars=1′);
window.open(dev60cg_url,’formslh’,’left=200,top=250,width=500,height=170,toolbar=1,resizable=1,scrollbars=1′);

}

function validateHttp(form)
{
if (form.http_t.value.length > 0)
{
var value1 = “http”
var value2 = “https”

if (form.http_t.value == value1 || form.http_t.value == value2)
{
var htp_v = form.http_t.value;
}else
{
alert(“Enter http or https. “+form.http_t.value+” is a invalid entry”);
form.http_t.focus();
return false;
}
}else
{
alert(“Enter http or https. Transfer protocol cannot be null”);
form.http_t.focus();
return false;
}

}

function validateHost(form)
{
if(notEmpty(form.hostname_t))
{
return true;
}else
{
var hst_v = form.hostname_t.value;
}
}

function validateDomain(form)
{
if (form.domain_t.value.length > 0)
{
var lastfour = form.domain_t.value.substr((form.domain_t.value.length – 4),4);

if (lastfour == “.com” )
{
var dmn_v = form.domain_t.value;
}else
{
form.domain_t.focus();
alert(“Domain value entered is not of standard. Domain should be of the format <domain_name>.<com>”)
return false;
}
}else
{
alert(“Domain Name cannot be null”);
return false;
}

}

function validatePort(form)
{
if (form.port_t.value.length > 0)
{
var anum=/(^\d+$)|(^\d+\.\d+$)/

if (anum.test(form.port_t.value))
{
testresult=true;
var prt_v = form.port_t.value;
}
else
{
alert(“Port number cannot have Characters”);
testresult=false;
form.port_t.focus();
}
return (testresult)
}else
{
alert(“Enter Port Number”);
return false;
}
}

function validateSid(form)
{
if(notEmpty(form.sid_t))
{
return true;
}else
{
var sid_v = form.sid_t.value;
}
}

function validateUser(form)
{
if(notEmpty(form.i_1))
{
return true;
}else
{
var usr_v = form.i_1.value;
}
}

function validatePwd(form)
{
if(notEmpty(form.i_2))
{
return true;
}else
{
var pwd_v = form.i_2.value;
}
}

function notEmpty(elem)
{
var str = elem.value;

if(str.length == 0)
{
alert(“You must fill in all required fields (*)”);
return false;
} else
{
return true;
}
}

</script>
</head>
<body>

<h2 style=”font-family:verdana;color:blue” align=”left”>
<font color=”#FF3300″>Oracle APPS – Health Check</font> </h2><b><hr></b>
<form name=details onsubmit=”javascript:launch();” METHOD=”POST” >
<center><br><br>
<table style=”font-family:verdana;font-size:80%;color:green”>
<tr>
<td><sup>*</sup> http / https </td>
<td><INPUT TYPE=”text” NAME=”http_t” VALUE=”” SIZE=”30″ MAXLENGTH=”30″ onBlur=”return validateHttp(this.form)”></td>
</tr>
<td><sup>*</sup> Hostname</td>
<td><INPUT TYPE=”text” NAME=”hostname_t” VALUE=”” SIZE=”30″ MAXLENGTH=”30″ onBlur=”return validateHost(this.form)”></td>
</tr>
<tr>
<td><sup>*</sup> Domain</td>
<td><INPUT TYPE=”text” NAME=”domain_t” VALUE=”” SIZE=”30″ MAXLENGTH=”30″ onBlur=”return validateDomain(this.form)”></td>
</tr>
<tr>
<td><sup>*</sup> Port</td>
<td><INPUT TYPE=”text” NAME=”port_t” VALUE=”” SIZE=”30″ MAXLENGTH=”30″ onBlur=”return validatePort(this.form)”></td>
<td>Enter 443 if port is https</td>
</tr>
<tr>
<td><sup>*</sup> SID</td>
<td><INPUT TYPE=”text” NAME=”sid_t” VALUE=”” SIZE=30 MAXLENGTH=”30″ onBlur=”return validateSid(this.form)”></td>
</tr>
<tr>
<td><sup>*</sup> Username</td>
<td><INPUT TYPE=”text” NAME=”i_1″ VALUE=”” SIZE=”30″ MAXLENGTH=”30″ onBlur=”return validateUser(this.form)”></td>
</tr>
<tr>
<td><sup>*</sup> Password</td>
<td><INPUT TYPE=”password” NAME=”i_2″ VALUE=”” SIZE=”30″ MAXLENGTH=”30″ onBlur=”return validatePwd(this.form)”></td>
</tr>
<tr>
<td></td><td><Input type=submit value=”Launch” >Powered by
<a href=”https://oraclepitstop.wordpress.com/”>OraclePitStop</a><p style=”font-family:verdana;color:black”> </p></center></td>
</tr>
</table>
</center>
</form>
</body>
</html>

————————————————————–
Feel free to incorporate your customizations.

cheers,
OraclePitStop

Read Full Post | Make a Comment ( 7 so far )

Liked it here?
Why not try sites on the blogroll...