httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "timuel" <timuel-apa...@voicenet.com>
Subject Re: Re[2]: [users@httpd] Testing if a Webserver is down
Date Thu, 31 Oct 2002 16:11:04 GMT
Check these out:

http://stein.cshl.org/~lstein/talks/perl_conference/cute_tricks/sos3.html
(will restart a dead apache on localhost... very easy to customize)

AND

http://www.backhand.org/wackamole/
(will bring up an IP on one machine when it dies on another... not as easy to
customize)

--
Tim Wesemann


----- Original Message -----
From: "Jacob Coby" <jcoby@listingbook.com>
To: <users@httpd.apache.org>; <jk@linux.amsjk.de>
Sent: Thursday, October 31, 2002 11:01 AM
Subject: Re: Re[2]: [users@httpd] Testing if a Webserver is down


| > AST> You could ping the domain in a loop
| > AST> ping <IP> -t
| >
| > Yes, I know, but how can I check it with a bash script?
| >
| > I  pipe  the  output  of  the ping comand through grep and count the
| > returned lines? But I really no nothing about bash-programming!
|
| Using ping is a bad idea, it won't give you meaningful results, unless the
| server is on fire or turned off.  I've had a webserver here go down (kernel
| panic), and it still responds to ping.
|
| Bash is really pretty easy to program for, using wget you can do:
|
| #!/bin/bash
|
| wget -t 1 -T 30 -q www.asdfjklsadfsdf.com
|
| if [ $? == 0 ]; then
|   echo 'server is up!';
| else
|   echo 'server is down!';
| fi
| ----
|
| from there, it's just a matter of plugging in your own scripts on what to do
| when the server is down :)
|
| Another option is nagios, a daemon that runs on one server and monitors
| other servers.  Comes with a web interface with nice features, and can email
| or page people responsable for bringing the downed server back up.
|
| -Jacob
|
|
| ---------------------------------------------------------------------
| The official User-To-User support forum of the Apache HTTP Server Project.
| See <URL:http://httpd.apache.org/userslist.html> for more info.
| To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
|    "   from the digest: users-digest-unsubscribe@httpd.apache.org
| For additional commands, e-mail: users-help@httpd.apache.org
|
|


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message