Translations of this page:

check_remote_by_http

check_remote_by_http is a nagios plugin for remote checking hosts by (simplified) http. It was written as a (fast) alternative to net-snmp and it is designed to work with knoerre, a small http-server. check_remote_by_http sends according to the given key a HTTP request to the remote server. Then it expects a value as a result of the remote check. It takes the value from the last line of the remote HTTP response. The value will be interpreted as a positive integer with up to 63 bits. If the remote value is greater than the specified warning or critical level then check_remote_by_http will also recognize the line before and print it contents as additional information. This additional or debug information is printed between the remote value and the performance data. Its output is formatted as HTML-data with the original URL sent to the remote host as link. See examples. key is a string sent as http GET request to the remote server and depends on the type of the remote http server. If i.e. the key load1 is specified then the following request is sent:

  GET /load1 HTTP/1.0 

If you use i.e. knoerre as remote http server then you will get a http response with the current load-per-1-minute as remote check value in the last line and the complete output of /proc/loadavg in the line before.

Usage

Usage:
check_remote_by_http  [ -D ] -w warnlevel -c critlevel -H ip-address -p port [ -u unit ] key 

Help

Options:

-w warnlevel
    Specify the warning level. The remote value must be greater than the warnlevel to trigger.

-c critlevel
    Specify the critical level. The remote value must be greater than the critlevel to trigger.

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

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

-u unit
    Specify an optional unit string which is placed after the remote value and which is visible in nagios.

See Also

check_remote_by_http_time(1) , knoerre(1)

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

Examples

Some examples of check_remote_by_http with knoerre as remote http server:

$ check_remote_by_http -w 10 -c 20 -H 172.16.1.1 -p 8888 load1
REMOTE OK - 0.14 | load1=0.14

$ check_remote_by_http -w 80 -c 90 -H 172.16.1.1 -p 8888 diskusage/home/www
REMOTE OK - 28 | diskusage/home/www=28

$ check_remote_by_http -w 1 -c 1 -H 172.16.1.1 -p 8888 process/blowfishd
REMOTE OK - 1 | process/blowfishd=1

$ check_remote_by_http -w 1 -c 1 -H 172.16.1.1 -p 8888 nfs/var/blowfishd/.I_AM_ALIVE.DO_NOT_DELETE
REMOTE OK - 1 | nfs/var/blowfishd/.I_AM_ALIVE.DO_NOT_DELETE=1
nagios/plugins/check_remote_by_http.txt · Zuletzt geändert: 2008/10/01 21:49 von reichhart
CC Attribution-Noncommercial-Share Alike 3.0 Unported
www.chimeric.de Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0