Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

file 72 lines (47 sloc) 1.966 kb

Nagios load test for Websites

This Nagios/Icinga plugin measure the complete load of an website.

PhantomJS - headless WebKit

This Nagios plugin uses PhantomJS for testing the load time. PhantomJS downloads and render the website as you are doing it with Firefox.

This test fetchs also all images/css/js files.

Command line

PhantomJS Options

You can pass-through options from the check_http_load_time.rb to PhantomJS.

Use the -l flag. (eg. -l 'proxy=localhost' for proxy settings on PhantomJS)

Tracking / Social Media on website slows down

If you have social media / tracking stuff on you site that you are monitoring it could slow down or alert your site if third party is offline.

You can ignore hosts with an patch from Jonas Genannt.

See: http://code.google.com/p/phantomjs/issues/detail?id=230

Patch: https://github.com/hggh/phantomjs/compare/ignore-host.patch

Afer installing PhantomJS with that patch use:

-l "ignore-host='(google.com|twitter.com)'

requirements to run phantomjs-nagios

  • ruby 1.8
  • ruby-json
  • PhantomJS 1.6 or higher (check_http_load_time.rb does not support Xvfb)

run check

check_http_load_time.rb -u http://www.fahrrad.de -w 1.9 -c 2.5 -e

OK: <a href='http://www.fahrrad.de'>http://www.fahrrad.de</a> load time: 1.78 | load_time=1776.0ms size=591152 requests=99 dom_elements=997

Nagios/Icinga performance data

  • load_time: load time of complete website in ms
  • size: complete size of all downloaded files in byte
  • requests: count of files (css,js,html,...)
  • dom_elements: count of all DOM elements on the site

Contact?

Jonas Genannt / http://blog.brachium-system.net

Something went wrong with that request. Please try again.