Previous Topic: FTP TestsNext Topic: HTTPS Tests


HTTP Tests

The HTTP test monitors the amount of time required to log in and test a website. You can test sites directly or use a proxy. This test supports the ability to search for regular expressions on a web page and to specify the number of nested levels you want the HTTP test to traverse during a test.

SRM uses HTTP 1.1 by default for all HTTP requests. It does handle HTTP 1.0 responses.

Options and Arguments

HTTP tests require the following specific options and arguments:

Specify these options and arguments when you create or modify tests.

Notes:

Examples

This section includes examples for testing web server response.

Example 1: Testing Web Server Response

Use this example to create a test that monitors the amount of time required to access the main web page at http://www.ca.com. This example tests the server once every 60 seconds and waits up to 20 seconds for a successful response. It calculates response time and availability statistics over the last 300 seconds (5 minutes).

To create a new test in a policy

  1. Click + (New) on the Test Monitors toolbar.

    The New test pane appears.

  2. From the Test Type list, select HTTP.
  3. In the Description field, specify ca_web.
  4. In the Test Name field, specify ca.com test.
  5. In the Test Interval field, specify 60.
  6. In the Test Timeout field, specify 20.
  7. In the Samples Per Interval field, specify 1.
  8. In the Statistics Window field, specify 300.
  9. In the URL To Test field, specify http://www.ca.com. You specify the full web address, including http://.
  10. Accept defaults for all other fields.
  11. Click Save Test.

When you commit your changes, SRM adds an entry similar to the following to the svcrsp.cf file:

{ 
index=25 
type=http
desc="ca-web" 
dest="http://www.ca.com" 
args="max_depth=3&content_dl=true&content_err=false"
interval=60 
samples=1 
timeout=20 
window=300 
tos=0 
limit=0 
status=active 
name="ca.com test"
class=""
context=""
flags="100"
loglevel=3
}

Example 2: Testing Web Server Response through a Proxy

Use this example to create a test that monitors the amount of time required to access the main web page at http://www.weather.com. In this example, the test accesses the weather.com website through a proxy server (myproxy) that is running on port 8080. This example tests the server once every 60 seconds and waits up to 20 seconds for a successful response. It calculates response time and availability statistics over the last 300 seconds (5 minutes).

To create a new test in a policy

  1. Click + (New) on the Test Monitors toolbar.

    The New test pane appears.

  2. From the Test Type list, select HTTP.
  3. In the Description field, specify weather.com_proxy.
  4. In the Test Name field, specify Proxy Test.
  5. In the Test Interval field, specify 60.
  6. In the Test Timeout field, specify 20.
  7. In the Samples Per Interval field, specify 1.
  8. In the Statistics Window field, specify 300.
  9. In the URL To Test field, specify http://www.weather.com. You specify the full web address, including http://.
  10. In the Proxy Server field, specify myproxy.
  11. In the Proxy Port field, specify 8080.
  12. Accept defaults for all other fields.
  13. Click Save Test.

When you commit your changes, SRM adds an entry similar to the following to the svcrsp.cf file:

{ 
index=26 
type=http
desc="weather.com_proxy" 
dest="http://www.weather.com" 
args="max_depth=3&content_dl=true&content_err=false&proxy=myproxy:8080" 
interval=60 
samples=1 
timeout=20 
window=300 
tos=0 
status=active 
name="Proxy test"
class=""
context=""
flags="100"
loglevel=3
}

Example 3: Matching Web Server Content

Use this example to create a test that downloads the web page at http://www.weather.com and searches the content for the regular expression, "cumulus." SRM records the number of times that this expression appears in the Results field for the test. This example tests the server once every 60 seconds and waits up to 20 seconds for a successful response. It calculates response time and availability statistics over the last 300 seconds (5 minutes). You can use a similar example to test content for the HTTPS Tests tests by specifying the HTTPS test type and a secure web server.

To create a new test in a policy

  1. Click + (New) on the Test Monitors toolbar.

    The New test pane appears.

  2. From the Test Type list, select HTTP.
  3. In the Description field, specify weather.com_content.
  4. In the Test Name field, specify Test Web Content at http://www.weather.com.
  5. In the Test Interval field, specify 60.
  6. In the Test Timeout field, specify 20.
  7. In the Samples Per Interval field, specify 1.
  8. In the Statistics Window field, specify 300.
  9. In the URL To Test field, specify http://www.weather.com. You specify the full web address, including http://.
  10. In the Frame Depth field, accept the default of 3 to search through 3 layers of the site for the search text.
  11. In the Text Match field, enter cumulus.
  12. Accept defaults for all other fields.
  13. Click Save Test.

When you commit your changes of the test, SRM adds an entry similar to the following to the svcrsp.cf file:

{ 
index=27 
type=http
desc="weather.com." 
dest="http://www.weather.com_content" 
args="max_depth=3&search=cumulus&minmatch=1&content_dl=true&content_err=false" 
interval=60 
samples=1 
timeout=20 
window=300 
tos=0 
limit=0 
status=active 
name="Web server content"
class=""
context=""
flags="1"
loglevel=1
}

For information about errors you may encounter when running HTTP tests, see HTTP Test Error Codes.