Users of web sites often complain about difficulties with logging into those sites. The causes of those difficulties include user error and problems with Web server. Using Uptime Infrastructure Monitor's HTTP (Web Services) monitor, you can monitor the page that users go to in order to login to a Web site.
|The HTTP (Web Services) monitor does not monitor the page that actually processes the login..|
The login page will probably contain a form (denoted by the <form> tags) that describes how the fields on the page are used to process a user login. In a Web browser window, the login form will look something like this:
The following is the HTML code for the form illustrated above:
<table width="100%" border="0" cellspacing="0" cellpadding="0"> <form method="POST" action="login.aspx"> <input type='hidden' name='state' value='LOGIN'> <tr> <td align='left' valign='top' nowrap> Username: </td> <td valign='top'> <input type='text' name='user' id='user' class='loginEntries' value='' maxlength='256'> </td> </tr> <tr> <td align='left' valign='top' nowrap> Password: </td> <td valign='top'> <input type='password' name='password' id='password' class='loginEntries' value=''> </td> </tr> <tr valign='middle'> <td align='right' colspan='2'> <input type='submit' name='login' value='Log In' title="Click this button to log in."> </td> </tr> </form> </table>
The variables that are needed to configure the monitor are enclosed in the blue <form> tags. The green POST variable indicates the HTTP POST function will be used in the service monitor instead of the GET function. The green login.aspx is the actual page on the Web server that will be monitored by the HTTP service monitor. The red variables are the POST variable settings that will be entered into the monitor template.
Monitoring the Login Page
To monitor a login page, do the following:
The Add Service window appears.
Enter the following in the Post String field:
The post string is a combination of all of the input variables in the login form; these variables were colored red in the example above. Each input variable within the form should be listed in the post string with an ampersand separating the fields. For example, if the form has only two input variables, input_one and input_two, you would enter them like this into the Post String field:
Notice that %20 is used instead of a space. This ensures that the string can be safely parsed by a Web browser.
If the error message is found, then the monitor will fail and will send an alert if you configured it to do so.