Table of Contents

Name

check_http_fwb - nagios plugin for checking HTTP service

Synopsis

check_http_fwb -I ip-address -w warnlevel -c critlevel [ -p port ] [ -H http11_hostname ] [ -u remotefile ] [ -A user_agent ] [ -t timeout ] [ -T(O|W|C) ] [ -G ] [ -P ] [ -D ] [ -0 ]

Description

check_http_fwb is a nagios plugin for checking HTTP. It differs from check_http by missing features which are rarely used, having a small codesize (7 KB statical code, diet-compiled and sstripped) and doing per default only a HEAD request.

Options

-I ip-address
Specify the IP address of the remote server to check.

-w warnlevel
Specify the warning level (response time in s).

-c critlevel
Specify the critical level (response time in s).

-p port
Specify the port of the http server on the remote host.

-H http11_hostname
Specify the hostname for name-based virtual hosts.

-u remotefile
Instead of using the default "/" you can request a different file.

-A user_agent
Specify the HTTP user agent (default: "check_http_fwb/1 (nagios-fwb)").

-t timeout
The plugins internal timeout in seconds (default: 10).

-TO
On timeout return OK instead of UNKNOWN.

-TW
On timeout return WARNING instead of UNKNOWN.

-TC
On timeout return CRITICAL instead of UNKNOWN.

-G
Use "GET". "HEAD" is the default in check_http_fwb and "GET" is the default in standard nagios plugin check_http.

-0
Overrides HTTP/1.1 mode even if a http11_hostname is given.

-P
Ping-mode: actually no HTTP request is send, just try to connect to port. In ping-mode the given times by -w and -c are interpreted as milliseconds.

-D
Use TCP_DEFER_ACCEPT (see tcp(7) ). This can speed up our http-communication by approx. 10 percent, but it breaks tcp-communication by RFC - like many others too. It can also cause trouble with loadbalancers like F5 which send "early" ACK packets to the server before ACK from client.

Files

check_http_fwb does not use any files, a sample nagios config is shown here:

define service{
use service_http

name http

check_command check_http_fwb!2!18

register 0

}
define command{
command_name check_http_fwb
command_line $USER1$/check_http_fwb -0 -I $HOSTADDRESS$ -w $ARG1$ -c $ARG2$ -A "Nagios-http-fwb-plugin/1 " -t 19
}
define command{
command_name check_http_fwb_1.1
command_line $USER1$/check_http_fwb -I $HOSTADDRESS$ -H $HOSTADDRESS$ -w $ARG1$ -c $ARG2$ -A "Nagios-http-fwb-plugin/1 " -t 19
}
define command{
command_name check_host_alive_p22
command_line $USER1$/check_http_fwb -I $HOSTADDRESS$ -w 25 -c 100 -p 22 -t 1 -P
}

See Also

http://downloads.tuxad.de/nagios-fwb

Examples

Here’s one example showing a GET-request for http://www.testdomain.de:8080/myfile.txt :

$ check_http_fwb -I 1.2.3.4 -w 2 -c 4 -p 8080 -H www.testdomain.de:8080 -u /myfile.txt -G
HTTP CRITICAL HTTP/1.0 404 Not Found - 0.016 second response time |time=0.016978s

A sample host-alive-check:

$ check_http_fwb -I 1.2.3.4 -w 25 -c 100 -p 8080 -t 1 -P
HTTP OK - 0.000 second response time |time=0.000533s

Author

Frank Bergmann, http://www.tuxad.com


Table of Contents