HowTo Monitor websites with HttpMonitor

Summary

The following HowTo describes setting up Zenoss to monitor webpages, defined by domain name and url, with HttpMonitor. You will setup needed devices, create a performance template based on HttpMonitor, and combine them to utilize graphs and thresholds of page load times. With a minimal amount of setup, you can have graphs of page load time, page size, alerts on uptime, and more for important websites.

Better alternative: ZenWebTX && IISMonitor

Enterprise customers are strongly advised to use ZenWebTX instead of HttpMonitor.

ZenWebTx extends Zenoss’ web monitoring capabilities beyond the simple uptime, load time, and size checks available in the Core version.

With ZenWebTx you can have Zenoss navigate through your entire web application checking for compliance at each step. Multiple timers can be set along the way to measure response time for each operation of the synthetic transaction as well as the total time for the entire transaction to complete.

For more information, please contact our client services team.

What is HttpMonitor?

HttpMonitor is a ZenPack that will add a new DataSource Type for you to use. For each HttpMonitor datasource you setup, you can get 2 datapoints:

  • seconds taken to perform the test
  • size of page loaded

For details about the various options that HttpMonitor provides, visit httpmonitor

Installation

Device Setup

Monitoring a website with the HttpMonitor ZenPack is as simple as monitoring any other sort of node, such as a server. Lets start by setting up a device specific for our use.

Add Device Class / Organizer

  • Under the left navigation menu, under ‘Classes’, click on ‘Devices’
  • Under the dropdown table menu for ‘Sub-Devices’, click ‘Add New Organizer...’
  • Input the name of the new organizer. It is suggested to name it “Web”
    • You can use this class organizer for all webpages that you want to monitor

Add Device

  • Under the dropdown page menu for /Devices (next to ‘Classes’ tab), click ‘Manage’ > ‘Add Device...’
  • Fill the pop-up as follows:
    • Name or IP: ex: “mycooldomain.com”
      • the domain name of the site that you want to monitor, do not include http
    • Device Class: in this case: “/Web”
    • Discovery Protocol: in this case: “none”
      • since http cannot reply to snmp requests, you would just get errors and warnings if you left this on
      • see here for details
    • All rest: defaults
      • see here for details
  • Click OK, and up should come the ‘Discover Devices’ page
    • The IP will be found and the device added.
    • If there are problems, be sure the domain you put in as the name can actually resolve on its own.

Change Device Preferences

  • Navigate to the device you created
    • you can follow the provided link in the ‘Discover Devices’ page, or navigate to /Devices/Web/mycooldomain.com
  • Under the dropdown page menu for /Devices/Web/mycooldomain.com (next to ‘Status’ tab), click ‘More’ > ‘zProperties’
  • Fill the settings as follows:
    • Set ‘zPingMonitorIgnore’ to “True”
      • for the same reason as above.
    • Set ‘zSnmpMonitorIgnore’ to “True”
      • you won’t be monitoring your site with SNMP, and this will keep you from seeing errors regarding the agent being down.
  • Click ‘Save’

Performance Template Setup

Next we will actually encounter HttpMonitor when setting up a Performance Template. It is useful in most cases to create a general Performance Template on the /Devices/Web class, and apply that to devices you add (i.e. each site). Then for special cases, like sites requiring authentication, you can create specific Performance Templates on those devices.

Create Performance Template

  • Navigate to the /Devices/Web class
  • Click the ‘Templates’ tab
  • Under the dropdown table menu for ‘Available Performance Templates’, click ‘Add Template...’
  • Enter a helpful name for the performance template in the ID field, such as “webPageChecker”
    • Your new Performance Template should show up on the list as: webPageChecker /Devices/Web

Add Data Source

  • Click on the new Performance Template ‘webPageChecker’
    • You will now be located at the /Devices/Web/Templates/webPageChecker
  • Under the dropdown table menu for ‘Data Sources’, click ‘Add DataSource...’
  • Fill the pop-up as follows:
    • ID: ex: “webPage”
      • the name of the DataSource you are creating
    • Type: choose “HttpMonitor”
      • listing of DataSource types
  • Click OK, and you now can configure the specifics of your new Data Source
  • Fill out the options as follows:
    • Severity: “Error”
      • When this check fails, the event added will be of the severity you set, so Error or higher is likely appropriate.
    • Url: “/”
      • The Url is what the check will hit. “/” is default, and this path is appended to the id of the device it is applied to. Thus in the example case, it would hit “mycooldomain.com/”. This would be appropriate to monitor your homepage.
    • For details about the various options that HttpMonitor provides, visit httpmonitor
  • Click ‘Save’

Bind the Template

Now you need to bind your new Performance Template to the /Devices/Web class you added. This allows any new device added to the /Devices/Web class to inherit the performance template settings that you created above.

  • Navigate to the /Devices/Web class
  • Click on the ‘Templates’ tab
  • Under the dropdown table menu for ‘Available Performance Templates’, click ‘Bind Templates...’
  • Select ‘webPageChecker’, the Performance Template you just added
    • Make sure to unselect the one that is selected by default (hold CTRL). The reason you unbind the default is that it monitors uptime with ping, which you do not want for monitoring a website.
    • This will bind your Performance Template to the class you are currently on, in this case /Devices/Web
    • All website devices you create under /Devices/Web will inherit the ‘webPageChecker’ Performance Template, and therefore be monitored using HttpMonitor!

Utilizing HttpMonitor

Now you have all the pieces in place to begin USING HttpMonitor! We will setup a graph and threshold based on page load time. Having page size and load time graphs can be helpful ways to quickly see whether your site is responding slowly for users over time, when, etc.

Create Graph

  • Navigate to the performance template that you created, ‘webPageChecker’
    • The above is in /Devices/Web, then click on the ‘Templates’ tab, then click ‘webPageChecker’
  • Under the dropdown table menu for ‘Graph Definitions’, click ‘Add Graph...’
  • Fill the ID as something like ex: “responseTime”
    • this will be the name of the Graph you are creating
  • Fill out the settings as follows:
    • Units: “seconds”
      • This is just a label for the graph
    • All rest: defaults
  • Click ‘Save’
  • Under the dropdown table menu for ‘Graph Points’, click ‘Add DataPoint...’
  • Fill the pop-up as follows:
    • Data Points: Select ‘webPage_time’
  • Now, for any device you add in /Devices/Web (or whichever class you bound the template to), you will have this graph available under the Perf tab.

Adding Thresholds (optional)

Aside from just knowing if your site is up or down, it is also helpful to know when it is performing outside of ranges you find acceptable. For example, if your homepage takes around 2 seconds to load, you may wish to set a threshold of 4 seconds. Then you could get alerts when your site is taking abnormally long to load and go find out why.

  • Navigate to the performance template that you created, ‘webPageChecker’
    • The above is in /Devices/Web, then click on the ‘Templates’ tab, then click ‘webPageChecker’
  • Under the dropdown table menu for ‘Thresholds’, click ‘Add Threshold...’
  • Fill the pop-up as follows:
    • ID: ex: “long_load_time”
      • the name of the Threshold you are creating
  • Fill out the settings as follows:
    • Data Points: ‘webPage_time’
    • Min Value: blank
      • you likely do not want to set a min value.
    • Max Value: ‘2’
      • select something above the average range of your page load times, but not too extreme. Perhaps twice your average load time would be appropriate, or a value you feel is the most tolerable.
    • Event Class: ‘/Status/Web’
      • the class that the event will fall under, can be any class you want
    • Severity: ‘Warning’
      • warning is a sensible level
  • Click ‘Save’
  • Now whenever your page takes longer than the max, it will throw an warning event!

Look at your work!

Perf Graph

  • Navigate to /Devices/Web/mycooldomain.com
  • Click on the ‘Perf’ tab
  • Bathe in the glory of your graph!

Threshold

  • To get a threshold to throw an event, right now, you can change your threshold to be very low
  • See the above part on threshold settings, and change Max Value: ‘.1’ or something very low
  • Navigate to a device that has this performance template bound to it, say /Devices/Web/mycooldomain.com
  • Wait for Orange or Red Events to happen, denoted by non-zero #’s.
    • Also, try clicking on the color to get details, or clicking on the ‘Events’ tab

Advanced Setup

FIXME should I do this?

Pertaining to webserver vs website monitoring... how to setup both at same time. Also, how to setup multiple website monitors that resolve to the same IP.

Someone made a comment about this, in particular, on the old how to.

Applies To

  • Zenoss 2.3
  • Zenoss 2.2
  • FIXME
 
technology/zenoss/howtos/monitoring_websites_with_httpmonitor.txt · Last modified: 04.06.2009 18:52 by nyeates1
 
Recent changes RSS feed Creative Commons License Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki