Skip to main content

WebInject code example

Here is an example of XML code for WebInject for performing several basic checks on a web application node.

Note: For more information about monitoring, see Monitoring your Jive environment.

This script is designed to perform the following checks on a web application node:

  • Request the Admin Console login page (case id="1"). This verifies that Apache and Tomcat are running.
  • Log in to the Admin Console (case id="2"). This verifies that the web application node can communicate with the database server.
  • Request the front-end homepage (case id="3"). This verifies at a high level that everything is okay.
  • Request the index page (case id="4").

In addition, consider monitoring the time it takes this check to run and set an alert threshold at N seconds to ensure this check succeeds in a timely manner.


<testcases repeat="1">
<testvar varname="BASEURL">http://my-jive-instance.my-domain.com:80</testvar>
<testvar varname="LOGIN">admin</testvar>
<testvar varname="PASSWORD">admin-password\</testvar>

<case
id="1"
description1="Hit main page"
description2="Verify 'SBS' exists on page"
method="get"
url="${BASEURL}/admin/login.jsp?url=main.jsp"
verifypositive="SBS"
/>

<case
id="2"
description1="Log in as admin user"
description2="Follow redirect"
method="post"
url="${BASEURL}/admin/admin_login"
postbody="url=main.jsp&login=false&username=${LOGIN}&password=${PASSWORD}"
verifyresponsecode="302"
parseresponse="Location:|\n"
/>

<case
id="3"
description1="Get main.jsp"
description2="Check for 'System'"
method="get"
url="{PARSEDRESULT}"
verifypositive="System"
/>

<case
id="4"
description1="Get index.jspa"
description2="Check for 'Welcome'"
method="get"
url="${BASEURL}/index.jspa"
verifypositive="Welcome|Location: ${BASEURL}/wizard-step\!input.jspa|Location: .*/terms-and-conditions\!input.jspa"
/>

</testcases>