8

Does anyone know of a Nagios plugin or cli program that can simulate the load time of a webpage as it would be in a browser.

For example the resulting total load time of something like Pingdom's Full Page Test or the timeline you get from firebug.

Kyle Brandt
  • 83,619
  • 74
  • 305
  • 448

7 Answers7

11

Selenium is the defacto standard for full-browser-render testing, so take a look at the check_selenium plugin

030
  • 5,901
  • 13
  • 68
  • 110
cagenut
  • 4,848
  • 2
  • 24
  • 29
  • 1
    One major plus for this choice is that the website link for the plugin links to a blog with SF flair on it :-) – Kyle Brandt Feb 07 '11 at 15:31
1

Could you script a browser? You might be able to use AppleScript to tell Safari to load the page and time it, if you are running on a Mac.

I don't know if this is close enough to a 'real' browser for your purposes, but another option is to use HTMLUnit, which is a Java library that is used for things such as User Acceptance Testing, Screen Scraping, and so-on. You could use the same library to time how long it takes for a page to load, but obviously this is a Java engine rather than a real browser so the performance may not be representative of what any particular user experiences. You may also not want to run Java-based Nagios scripts.

Rich
  • 1,343
  • 7
  • 28
  • 39
1

Nagios Exchange has a simple PHP-based plugin which checks the load time of a webpage and reports if it takes longer than a specificed period of time. It is called "Check Website Speed"

runlevelsix
  • 2,619
  • 22
  • 20
1

Maybe Selenium-RC and this? IANAWD/IANAWP, so I cannot say for sure. I have just heard a lot of good things and Selenium before.

EDIT: Yeah, I'm the kind of idiot that did not read the first answer, but proceeded to recycle it. Apologies everybody.

songei2f
  • 1,934
  • 1
  • 20
  • 30
1

You can create a Nagios check script that starts a web browser. Selenium or the iMacros Firefox/Chrome addons will work fine for that purpose. Both are free and open-source.

Example: Start iMacros for Firefox via the command line and run a small macro like

VERSION BUILD=7110203 RECORDER=FX
TAB T=1
URL GOTO=http://serverfault.com/
TAG POS=1 TYPE=H1 ATTR=ID:h-top-questions

=> This will give you the exact page load time in Firefox or Chrome. Plus, you can use the same setup for transaction monitoring.

FrankPython
  • 199
  • 4
1

Maybe worth a look: phantomjs-nagios: "Render an complete Webpage headless and test load time with nagios".

gxx
  • 5,591
  • 2
  • 22
  • 42
1

Here you can find a list with some website speed tests: https://exchange.nagios.org/directory/Plugins/Websites,-Forms-and-Transactions

RVE
  • 111
  • 3