Example: monitoring and alerting on web page content
You can use the TCPIP monitor to monitor web pages. The HTTP Content monitor checks a specified web page to make sure that content appears on the page. If the results of the web page content are not what is expected, you can be notified through an associated action.
For example, to check whether a page is up and available, you can look for a text string contained in the web page. The following script checks for the words "WhatsUp Gold Tech Support" on the WhatsUp Gold main Support page. If this HTTP Content monitor shows as UP, the web page is displaying as expected. If this HTTP Content monitor shows as DOWN, he web page is down, missing, or has been changed:
Send=GET /support/index.aspx HTTP/1.0\r\nAccept: */*\r\nHost:www.whatsupgold.com\r\nUser-Agent: WhatsUp/1.0\r\n\r\n
Expect=WhatsUp Gold Tech Support
To configure a web page monitor:
- Go to the Active Monitor Library.
- From the web interface, click . The GO menu appears.
- If the WhatsUp section is not visible, click . The WhatsUp section of the GO menu appears.
- Select . The Active Monitor Library appears.
- or -
- From the main menu bar of the console, select . The Active Monitor Library appears.
- Click . The Select Active Monitor Type dialog appears.
- Select , then click . The New HTTP Content Monitor dialog appears.
- Enter or select the following information for the monitor:
- . Enter a name for the monitor as it will appear in the Active Monitor Library.
- . Enter a short description for the monitor as it will appear in the Active Monitor Library.
HTTP server settings
- . Enter the URL address that you want to check using the monitor. The URL must begin with a proper URI, such as
http://
or https://
.: The URL can include the full path to the document, including the document's file name and any query string parameters. For example, http://www.domain.com/nmconsole/reports.htm?ReportID=100 .
- . If required, enter the username the web site uses for authentication.
- . Enter the password that coincides with the username that the web site uses for authentication.
: The HTTP Content Monitor only supports basic authentication.
- . Enter the number of seconds WhatsUp Gold should attempt the connection.
- . If the content that you want WhatsUp Gold to check is behind a proxy server, enter the proxy server's IP address.
- . Enter the port on which the proxy server listens.
Web page content
- . Enter the content that you would like WhatsUp Gold to look for on the web page it checks. Enter either plain text or a regular expression.
- . Select this option to use regular expression in .
: The HTTP Content Monitor uses standard regular expression processing as supported by the .NET framework.
: Refer to the script above as an example for setting up a check for expected content on a specific web page URL.
To configure a web page monitor and email alert for a device:
- Right-click the device (web server) that hosts the web page content for which you want to monitor. The Device Properties dialog appears.
- Click . The Active Monitors dialog appears.
- Click . The Select Active Monitor Type dialog appears.
- Use the following process to add the HTTP Content Monitor. This monitor checks that the Web server returns valid content in response to an HTTP request.
On the Select Active Monitor Type screen, select the HTTP Content Monitor that you created above, then click . The Set Polling Properties dialog appears.
- Leave the default settings selected ( and ), then click . The Setup Actions for Monitor State Changes dialog appears.
- Select , then click . The Select or Create Action dialog appears.
- Select , then click . The Select Action and State dialog appears.
- In the list, select and existing email action or click browse () to create a new email action. Refer to the Help for creating a new email action.
- In the list, select , then click to save the changes and return to the Setup Actions for State screen.
- Click to save the changes and return to the Setup Actions for Monitor State Changes dialog.
- Click . The Device Properties dialog appears.
- Click .
The active monitor and resulting E-mail Action are now enabled. When the web page cannot return the web content, the page is triggered as down and the HTTP Content Monitor fails, triggering the E-mail Action that tells you that the page is down the Web server cannot return web content.