Plugin: check_http_requisites - Page Size, Files, and Loadtime

Summary

A Nagios module written in Python that downloads the page and embedded elements using 'wget' to measure a more realistic total page load time value.  The total number and size of elements as well as the time it took to load the them is returned.  A warn/critical alert can be triggered by the total load time.

Usage Example

Ideally you want your total page load time to be less than a few seconds.  This means making sure your images are sized correctly and in the correct format.  eg. a JPEG vs. a large BMP file.  Also any "embedded" objects like externally referenced image/media files do not slow your site down.  Or perhaps your website is under load and just not responding in a timely fashion.

Using this plugin we can relatively monitor the load time of select sites and/or pages within a site.  Note that the check is somewhat dependent on the system executing the check and its network bandwidth.  While unlikely to be running Nagios over dialup, bandwidth limitations and other traffic could definitely affect the total page load time.  Also this could alert you in the case of a sub-optimal routing, latency, and/or packet loss issue.  What I like to call the "TII", aka Transient Internet Issue.

Adding to NagiosGraph

Of course graphs are always visually pleasing and allow you to make your point about what happens when Marketing uploads 1meg BMP files instead of the recommended JPEGs.  Here is the NagiosGraph map file entry I added.


# Service type: check_http_complete
# output: OK - Downloaded: 149K bytes in 8 files in 0.83 seconds
# perfdata: time=0.83;size=149K;number=8
/perfdata:.*time=([.0-9]+);size=(\d+)K;number=(\d+)/ and
push @s, [ http_complete,
[ sec, GAUGE, $1 ],
[ KB, GAUGE, $2 ],
[ files, GAUGE, $3 ] ];

Available Here : http://www.nagiosexchange.org/cgi-bin/page.cgi?g=Detailed%2F1352.html;d=1