Search Exchange

Search All Sites

Nagios Live Webinars

Let our experts show you how Nagios can help your organization.

Contact Us

Phone: 1-888-NAGIOS-1
Email: sales@nagios.com

Login

Remember Me

Directory Tree

check_webpage.sh

Rating
15 votes
Favoured:
2
Current Version
2.0
Last Release Date
2013-04-08
Compatible With
  • Nagios 1.x
  • Nagios 2.x
  • Nagios 3.x
  • Nagios XI
  • Nagios Fusion
License
GPL
Hits
83313
Files:
FileDescription
check_webpage_2.0.shcheck_webpage_2.0.sh
Nagios CSP

Meet The New Nagios Core Services Platform

Built on over 25 years of monitoring experience, the Nagios Core Services Platform provides insightful monitoring dashboards, time-saving monitoring wizards, and unmatched ease of use. Use it for free indefinitely.

Monitoring Made Magically Better

  • Nagios Core on Overdrive
  • Powerful Monitoring Dashboards
  • Time-Saving Configuration Wizards
  • Open Source Powered Monitoring On Steroids
  • And So Much More!
IMPORTANT CHANGES IN NEW VERSION!!!!!!
* The -f and -A options are no more needed.
* The -tw and -tc options expect the time to be indicated in MILLISECONDS, not in seconds!!!
DESCRIPTION:
The principal object of check_webpage.sh is to give stats about the time a complete webpage takes to load. You can monitor your own webpages or you can take some general stats of your navigation infraestructure. By default the script always gives an OK state because it has statistical purposes, but is prepared to give you warning or critical states depending on the values you want for elapsed time or percentaje of erroneous downloaded files
The script basically use wget to obtain an entire webpage with her own dependences (css, images, etc). I prefer wget instead curl because it has more recursion support to parse and obtain dependences. The problem is that wget download the index.html and parse it to obtain the rest of dependences, so you need to have this file in somewhere to download de rest. If you have to exec various checks at same time, all the work can be used in I/O opperations and you are going to take bad results in your stats. If you try to redirect all to /dev/null you can't parse the index.html and the download end. To solve this problem I use a TMPFS File System of 6 Mb that is unmounted when the script ends or if we receive some
TERM signal

Use -h or --help to see the options it can use.

If you are getting some trouble, use the -D (Debug) option to see what the script are doing. The Debug output is sent to STDERR


IMPORTANT: Read the comments in the script to see how it works and the necessary configuration dependences of your system ;)
Reviews (2)
byKoobal, October 31, 2012
1 of 1 people found this review helpful
Thanks Alejandro for your help !
Very nice script and a very comprehensive scripter.
bykperas, March 15, 2012
1 of 1 people found this review helpful
needed to check Webpage / Tomcats and so. Found this plugin, and it was not working the way i wanted. BUT THEN!!!!

Had great support from Alejandro, the maker of this plugin! He really helped making the plugin work, the way i need it!!

Again: Thanks a lot Alejandro!

If you want to check your webpages, i highly recommend this plugin.