## Web Server Monitoring

The Web server collection provides a program for monitoring Web servers. It periodically checks that a server responds to requests.To use the tool, start the `web-server-monitor` launcher as follows:

> `web-server-monitor` alert-email host-name [port] [poll-frequency-seconds] [server-response-timeout-seconds]

The monitor will send a HTTP HEAD request to the server at `host-name` on port `port` (or 80) every `poll-frequency-seconds` seconds (or 1 hour). If the server does not respond within `server-response-timeout-seconds` (or 75) seconds then the monitor will email `alert-email` about the problem. Also, if the Web server responds with an error, the monitor will email the error message to `alert-email`. For example, the following monitors the Web server for the book ``How to Design Programs''

> `web-server-monitor ptg www.htdp.org`

On UNIX systems, it is usually a good idea to redirect standard in, out, and error to `/dev/null` so the monitor will not quit due to a `SIGHUP` (hangup signal) when you log out. i.e.

> `web-server-monitor ptg www.htdp.org > /dev/null < /dev/null 2>&1 &`

Powered by