Example: Monitoring and alerting on web page content

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.

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:

  1. From the WhatsUp Gold web interface, go to Admin > Monitors. The Monitor Library dialog appears.
  2. Click the Active tab inside the dialog.
  3. Click New. The Select Active Monitor Type dialog appears.
  4. Select HTTP Content Monitor, then click OK. The Add HTTP Content Monitor dialog appears.
  5. Enter or select the appropriate information:
    • Name. Enter a name for the monitor as it will appear in the Active Monitor Library.
    • Description. Enter a short description for the monitor as it will appear in the Active Monitor Library.

    HTTP server settings

    • URL. 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://.

    Note: 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 .

    • Authentication username. If required, enter the username the web site uses for authentication.
    • Authentication password. Enter the password that coincides with the username that the web site uses for authentication.

    Note: The HTTP Content Monitor only supports basic authentication.

    • Timeout (seconds). Enter the length of time WhatsUp Gold attempts to connect to the selected device. When the time you enter is exceeded without connecting, a timeout occurs and WhatsUp Gold stops trying to connect to the SMTP server. This is considered a failed connection.
    • Proxy server. If the content that you want WhatsUp Gold to check is behind a proxy server, enter the proxy server's IP address.
    • Proxy port. Enter the port on which the proxy server listens.

    Web page content

    • Web page content to find. 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.
    • Use regular expression. Select this option to use regular expression in Web page content to find.

    Note: The HTTP Content Monitor uses standard regular expression processing as supported by the .NET framework.

    Note: 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:

  1. Right-click the device (web server) that hosts the web page content for which you want to monitor. The Device Properties dialog appears.
  2. Click Active Monitors. The Active Monitors dialog appears.
  3. Click Add. The Select Active Monitor Type dialog appears.
  4. Select the monitor to add to the device from the list. Look for the monitor name that you assigned to the monitor created in the previous steps. This is your HTTP Content monitor.
  5. Complete the settings for the monitor:
    1. Leave the default settings selected (Enable polling for this Active Monitor and Use default network interface), then click Next. The Setup Actions for Monitor State Changes dialog appears.
    2. Select Apply individual actions, then click Add. The Select or Create Action dialog appears.
    3. Select Select an action from the Action Library, then click Next. The Select Action and State dialog appears.
    4. In the Select an action from the Action Library list, select an existing email action or click browse (...) to create a new email action.
    5. In the Execute the actions on the following state change list, select Down, and then click Finish to save the changes and return to the Setup Actions for State page.
    6. Click Finish to save the changes and return to the Setup Actions for Monitor State Changes dialog.
    7. Click Finish. The Device Properties dialog appears.
    8. Click OK to save changes.

The active monitor and resulting email 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 email action that tells you that the page is down and that the Web server cannot return web content.

See Also

Adding and editing an HTTP Content Monitor