Search Exchange
Search All Sites
Nagios Live Webinars
Let our experts show you how Nagios can help your organization.Login
Directory Tree
check_http perl script with additional features (modified to work with groundwork)
112654
File | Description |
---|---|
check_http_enhanced.pl | checkhttp perl script with host and user agent headers support (modified to work with groundwork) |
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 is based on wiburg's checkhttp perl script with many new configurable options - read the parameter list below:
Usage: -H -u -p -s
[-w warning HTTP code] [-c critical HTTP code]
[-W warning content regex] [-C critical content regex]
This plugin tests the HTTP service on the specified host. The warning and/or
critical conditions can be either the HTTP response code or a regular
expression which matches the HTTP body.
-H, --host
-u, --url (Default: /).
-p, --port (Default: 80).
-s, --ssl
Attempt SSL connection (Default: off).
-A, --useragent
Specify the User Agent header value (Default: "check_http").
-n, --hostname
Specify the Host header value (Default is the same as the host address).
-m, --method <(GET|POST)>
Specify the HTTP request method (Default: GET).
-t, --timeout
Set the timeout for the request in seconds (Default: 10 seconds).
-M, --maxredir
Set the maximum number of redirects to be performed. (Default: 7).
-r, --post_param
Specify a paramter name for when the selected method is POST.
-v, --post_value
Specify a value for when the selected method is POST.
-T, --content-type
Set a content type for POST requests (Optiona).
-k, --cookie_value
Specify a value for a cookie.
-w, --warningHttpCode
Return state=warning, if the specified HTTP code (404, 303, ...) is returned.
-c, --criticalHttpCode
Return state=critical, if the specified HTTP code (404, 303, ...) is returned.
-W, --warningExpression
Return state = warning if regex matches against page content.
-C, --criticalExpression
Return state = critical if regex matches against page content.
The -w, -c, -W and -C options can be specified multiple times.
If -w, -c, -W or -C option are not specified the following rules apply:
OK: HTTP Response Code 2xx
WARNING: HTTP Response Code 3xx
CRITICAL: HTTP Response Code 4xx or 5xx
But without the -w, -c, -W and -C options you would be better off using the standard check_http plugin.
-h, --help
Prints this help message.
Usage: -H -u -p -s
[-w warning HTTP code] [-c critical HTTP code]
[-W warning content regex] [-C critical content regex]
This plugin tests the HTTP service on the specified host. The warning and/or
critical conditions can be either the HTTP response code or a regular
expression which matches the HTTP body.
-H, --host
-u, --url (Default: /).
-p, --port (Default: 80).
-s, --ssl
Attempt SSL connection (Default: off).
-A, --useragent
Specify the User Agent header value (Default: "check_http").
-n, --hostname
Specify the Host header value (Default is the same as the host address).
-m, --method <(GET|POST)>
Specify the HTTP request method (Default: GET).
-t, --timeout
Set the timeout for the request in seconds (Default: 10 seconds).
-M, --maxredir
Set the maximum number of redirects to be performed. (Default: 7).
-r, --post_param
Specify a paramter name for when the selected method is POST.
-v, --post_value
Specify a value for when the selected method is POST.
-T, --content-type
Set a content type for POST requests (Optiona).
-k, --cookie_value
Specify a value for a cookie.
-w, --warningHttpCode
Return state=warning, if the specified HTTP code (404, 303, ...) is returned.
-c, --criticalHttpCode
Return state=critical, if the specified HTTP code (404, 303, ...) is returned.
-W, --warningExpression
Return state = warning if regex matches against page content.
-C, --criticalExpression
Return state = critical if regex matches against page content.
The -w, -c, -W and -C options can be specified multiple times.
If -w, -c, -W or -C option are not specified the following rules apply:
OK: HTTP Response Code 2xx
WARNING: HTTP Response Code 3xx
CRITICAL: HTTP Response Code 4xx or 5xx
But without the -w, -c, -W and -C options you would be better off using the standard check_http plugin.
-h, --help
Prints this help message.
Reviews (1)
byromildo, September 20, 2011
Nice plugin that allows to pass a cookie but what happened to the username and password option? Am I missing something?
Romi
Romi