Skip to content
A nagios (or compatible) plugin in ruby to check a web page in the most efficient way.
Ruby HTML Shell CSS
Find file


The aim of this nagios compatible check script is to download a web page with all his content.

I used Check HTTP Requisites plugin but it's a mono thread way and it's too slow for performance checks.

Main features

  • Ruby small script, easy to understand and hack ...
  • Use the powerful and simple hpricot lib to parse html
  • Multi-thread
  • Keyword check
  • Follow redirections
  • Download all the links on the page or only the html
  • Supported options: gzip deflate, auth, proxy, http post, https


$ ./check_webpage.rb -vv -u

 * ARGS: c=60 w=5 e=0 w2=10 u=

 * Get main page:
   -> 302, main page is now:
[200] OK s(6697) t(0.251305)

 * parsing results (1) ... -> add

 * remove duplicated links: 1 -> 1

 * downloading inner links (1) ...
[200] OK /intl/fr_fr/images/logo.gif -> s(8866o) t(0.09s)

 * results
Inner links count: 1
Inner links dl cumulated time: 0.09s
Total time: 0.35s
Total size: 15ko

OK - 15ko, 2 files, 0.35s



Something went wrong with that request. Please try again.