Example: monitoring and alerting on web page content

You can use the HTTP Content monitor (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 (HTTP Content active monitor):

  1. Go to the Active Monitor Library.
    • From the web interface, click GO. The GO menu appears.
    • If the WhatsUp section is not visible, click WhatsUp. The WhatsUp section of the GO menu appears.
    • Select Configure > Active Monitor Library. The Active Monitor Library appears.

      - or -

    • From the main menu bar of the console, select Configure > Active Monitor Library. The Active Monitor Library appears.
  2. Select HTTP Content, then click Copy. The Edit TCPIP Monitor dialog appears.
  3. Enter or select the following information for the monitor:
    • Name. The name of the monitor as it appears in the Active Monitor Library.
    • Description. The description of the monitor as it appears in the Active Monitor Library.
    • Network type. Select either TCP, UDP, or SSL from the pull-down menu. The network type for the FTP (File Transfer Protocol) service is TCP; the network type for the RADIUS (Remote Authentication and Dial-In User Service) service is UDP. The HTTPS monitor uses the SSL type.
    • Port number. Enter the TCP or UDP port that you want to monitor.
    • Timeout. Amount of time (in seconds) WhatsUp Gold should wait for a response to a poll.
    • Script. Write your script using as many Send, Expect, SimpleExpect, and Flow Control keywords as you would like. For more information, see Script Syntax.
    • Expect. Opens the Rules Expression Editor. Whatever is placed in the Expression box appends to the end of the script as an Expect expression.
    • Use in discovery. Select this option to have the monitor appear in the Active Monitors list during discovery. From there, you can select the monitor to have WhatsUp Gold discover that monitor type on your devices.

      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 (HTTP Content active 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. Use the following process to add the HTTP Content active monitor. This monitor checks that the Web server returns valid content in response to an HTTP request.
    1. On the Select Active Monitor Type screen, select HTTP Content, then click Next. The Set Polling Properties dialog appears.
    2. 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.
    3. Select Apply individual actions, then click Add. The Select or Create Action dialog appears.
    4. Select Select an action from the Action Library, then click Next. The Select Action and State dialog appears.
    5. In the Select an action from the Action Library 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.
    6. In the Execute the actions on the following state change list, select Down, then click Finish to save the changes and return to the Setup Actions for State screen.
    7. Click Finish to save the changes and return to the Setup Actions for Monitor State Changes dialog.
    8. Click Finish. The Device Properties dialog appears.
    9. Click OK.

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 E-mail Action that tells you that the page is down the Web server cannot return web content.