Git Product home page Git Product logo

phantomjs-nagios's Introduction

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 load and render the website as you are doing it with your browser.

Command line

  • -u, --url [STRING]
  • -w, --warning [FLOAT]
  • -c, --critical [FLOAT]
  • -p, --phantomjs [PATH]
  • -n, --netsniff [PATH]
  • -e, --html
  • -j, --jscheck [STRING]
  • -l, --ps-extra-opts [STRING]
  • -r, --request [RANGE]
  • -s, --size [RANGE]
  • -d, --domelemets [RANGE]
  • -P, --perf
  • -v, --verbose [n]

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
  • json
  • PhantomJS 1.9 or higher (check_http_load_time.rb does not support Xvfb)

run check

check_http_load_time.rb --perf -c 3 -w 2 -u http://www.fahrrad.de

OK: http://www.fahrrad.de load time: 1.59 | load_time=1590.0ms size=1058140 requests=105 dom_elements=1319 load_time_initial_req=93ms

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
  • load_time_initial_req: the load time of the first request

Contact?

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

phantomjs-nagios's People

Contributors

hggh avatar fnemeth avatar jbraeuer avatar sescher avatar stephenrjohnson avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.