Websites, Forms and Transactions

check_url_status

Description:

Checks the avaibility of websites and interpretes the returncode according to RFC 2616. Works with proxies, proxy authentication. Can check password protected websites.By Martin Fuerstenau

Current Version

Last Release Date

June 22, 2009

Compatible With


Project Files
Project Notes
This plugin checks the status of websites and gives back the returncode according to RFC 2616 and the appropriate message string. Opposite to check_url by yunus it uses NO system calls. Mainly for security reasons but a little bit for style. It is based on libwww-perl and there is no need for system-calls. The script support proxies with and without authentication via command line switches. The script support checks for password protected websites via command line switches. You have to supply a user and a password. This plugin is compatible with the Nagios plugin developer guidelines. Therefore a util.pm is needed and I supply an own one. The only difference to the one from the official plugin package is the contact address. You can use the original one. In that case the output from --help is not correct beecause there is a wrong contact. Thats all. The documentation is within the plugin. This plugin will not run from within the embedded perl of nagios 2.3 and higher due to the fact that embedded perl like on Apache has several restrictions. If you do not need the performance improvement it is easier not to use the embedded perl. Attention: In case of using a proxy be sure that all error codes are forwarded. If the proxy displays a error page of itself you check this page instead of the page you wanna check. Version history: 1st Aug 2006 Version 1.0 - The site can be on the LAN or within the internet. - The site can be behind a proxy with or without authentication. - The plugin can handle proxy authentication on a user/password basis. - Therefore a user and a password has to be submitted when calling the plugin - The site can be whith or without authentication - The plugin can handle website authentication. - Therefore a user and a password has to be submitted when calling the plugin For easier use the commandline options of the plugin are based on the syntax of wget. 13th Jun 2008 Version 1.1 - Added -o, --outout for giving back the checked URL 13th Jul 2010 Version 1.2 - Bugfix - proxy without user/password failed. Fixed - Cleaned up the code a little bit. - Removed the usage of utils.pm - Removed the usage of global variables. my will do the work too. You can easily place comments after the definition and/or assign values to the variables at time of creating them. - Redirected STDERR to /dev/null. Due testing I recognized that there are websites in UTF-8 causing an error like: "Parsing of undecoded UTF-8 will give garbage when decoding entities at /usr/lib/perl5/vendor_perl/5.8.8/LWP/Protocol.pm line 114." because this is a little bit confusing to users it is redirected. this warning is caused by libwww-perl itself and therefore it can not be covered by this program - New switch -n | --negate to negate the result. For example a 200 is critical and a 500 is good 23rd Jul 2014 Version 1.3 - Bugfix - proxy connection failed with https. Fixed.
Reviews (2) Add a Review
Love the HTAccess CLI Argument
by Tony-Caffe, May 31, 2015

Thank you for adding this plugin. Most dont let you specify htaccess login to check a site. IMO this is very crucial. My Command Definition Example: # 'check_url_status' command definition with htaccess login define command{ command_name check_url_status command_line $USER1$/check_url_status -U $ARG1$ --http-user=$ARG2$ --http-passwd=$ARG3$ } Thanks!



check_url_status
by ravikiran189, January 31, 2012

Its a good plugin though...But needs some modifications For Nagios 2.X or 3.X do the following #use lib "/usr/lib/nagios/ops_plugins" ; needs to be replaced with #use lib "/usr/local/nagios/libexec" ; Thanks RK



Add a Review

You must be logged in to submit a review.

Thank you for your review!

Your review has been submitted and is pending approval.

Recommend

To:


From:


Thank you for your recommendation!

Your recommendation has been sent.

Project Stats
Rating
4.8 (4)
Favorites
1
Views
113,616