Home Directory Plugins Network Protocols HTTP check_http perl script

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_http perl script

Rating
1 vote
Favoured:
0
Hits
140282
Files:
FileDescription
check_http.plcheck_http perl script
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!
This plugin is _no_ replacement of the default check_http plugin, but it allows to define critical and/or warning status depending on content and/or http response code.
This plugin is _no_ replacement of the default check_http plugin.

It provides some functionality which the standard check_http doesn't have.

The standard check_http plugins doesn't allow to set warning or critical status depending on the page content. check_http can only return OK or Critical if a string (or regular expression) matches.

Using this plugin you can set multiple conditions for warning and/or critical status.

Example:
Combine regex and http codes:
./check_http.pl -H host.domain.com -u /test.html -W 'Wwarn' -W 'Mmissing' -C 'Ccrit' -c 500 -c 404


Capital options (-W and -C) indicate regex patterns which should match the page content.
The lowercase options are reserved for the HTTP Codes (regex can be used too).

There still many open tasks like user authentication support, configurable redirect support ...
Updates will follow.


Usage:
-H
-u (default: /)
-p (default: 80)
-s, --ssl

connection via ssl (default off)

-w

state=warning, if the specified http code (404, 303, ...) is returned

-c

state=critical, if the specified http code (404, 303, ...) is returned

-W

if regex matches against page content -> state = warning

-C

if regex matches against page content -> state = critical

-h, --help

prints this help message


The -w, -c, -W and -C options can be specified multiple times.

If no -w, -c, -W or -C option is specified the following rules apply:

OK: HTTP Response Code 2xx
WARNING: HTTP Response Code 3xx
CRITICAL: HTTP Response Code 4xx or 5xx

But without -w, -c, -W and -C option you better use the standard check_http plugin.
Reviews (1)
bypierreact, September 12, 2010
Too bad it doesn't have the -I option.
As it is right now, it's useless for me :(