Build precise queries to find exactly what you need
Press ESC to close
Your review has been submitted and is pending approval.
check_http_header is a web content monitor written in perl. Checks http header for text. It`s very rare task... Standart nagios check_http checks only content for regexp existance. So, maybe this plugin will be useful for somebody exept me. retrieves header of http responce and looks in its output for a given text (regexp). If the text is found returns OK, if not found returns CRITICAL, and UNKNOWN otherwise (connection error,...) plus a brief error description. It has no other dependencies than PERL itself and some libraries (Getopt::Std and ,WWW::Curl::Easy)
Current Version
0.01
Last Release Date
2010-08-12
Owner
Sergey
Website
http://ksimute.trancom.ru
License
GPL
Compatible With
Retrieve an http/s URL and looks in its header (ACHTUNG HTTP header not content!) Output for a given text. Returns CRITICAL is not found, OK if found, UNKNOWN otherwise.
--help shows this message --version shows version information
-I IP address or name (use numeric address if possible to bypass DNS lookup). -u URL to GET -r <text> regexp to match in the output of http header -t Timeout in seconds to wait for the URL to load. If the page fails to l oad, check_http_header will exit with UNKNOWN state (default 60) -p Port
Example: $ curl -I ksimute.trancom.ru HTTP/1.1 301 Moved Permanently ..... Vary: Accept-Encoding,Cookie X-Vary-Options: Accept-Encoding; ..... ......
$ ./check_http_header.pl -I ksimute.trancom.ru -r Vary -p 80 -u / -t 20 OK REGEXP FOUND
$ ./check_http_header.pl -I ksimute.trancom.ru -r Varyddd -p 80 -u / -t 20 REGEXP NOT FOUND
Hint:
If script is not working with embedded perl in nagios typical error (Service check did not exit properly), like many other perl scripts :(, user following line to describe nagios command
define command{ command_name check_header command_line /usr/bin/perl /usr/lib/nagios/plugins/my/check_http_header.pl -I $HOSTADDRESS$ -p 80 -u '/myurl' -r Regexp -t 20 }
i.e. call external perl for interpretation.
You must be logged in to submit a review.
To:
From: