WebPing is a tiny utility to check availability of remote web pages. It produces an HTML report to show results. It can send mails alerts when a page can't be reached. It also search for a given string in the page and calculate page response time.
This is basically a stupid and simple script. It was created at EDF for the very specific needs of the internal intranet team but can be used in other contexts.
- a Python interpreter (tested with Python 2.4.x), to build and run WebPing.
- an access to internet, to let buildout download its dependencies via PyPi.
- a web server (tested with Apache 2.2.x), to serve generated HTML reports.
- a cron-like software, to "tick" WebPing regularly.
- SQLite > 3.x.
Install and Setup steps
This how-to is designed around our current internal use of WebPing. Don't forget to adapt it to you needs and your environment.
Install required system packages.
On RHEL 5.x:
$ sudo yum install git gcc sqlite-devel python-devel
On Ubuntu 11.04:
$ sudo apt-get install git gcc libsqlite3-dev python-dev
Check out the latest version of WebPing from GitHub:
$ cd /var/www $ git clone git://github.com/kdeldycke/webping.git
Fix rights and ownership (quick and dirty):
$ chmod -R 755 ./webping $ chown -R www-data:www-data ./webping
Initialize the buildout environment:
$ su - www-data $ cd /var/www/webping $ python ./bootstrap.py --distribute
Run buildout itself:
Setup the cron file:
$ sudo echo "*/10 * * * * www-data /var/www/webping/bin/webping" > /etc/cron.d/webping
Register WebPing's specific web configuration to your Apache server:
$ ln -s /var/www/webping/apache.conf /etc/apache/conf.d/ $ /etc/init.d/apache stop $ /etc/init.d/apache start
Eventually change WebPing config file to match your needs:
$ vi /var/www/webping/webping.conf
- Step 3 of the install process above is stuck when running the bootstrap script, and/or return a connection timeout error.
- This may be due to your machine/user not having access to internet. Please carefully check your network/proxy configuration.
- Pages seems to be checked regularly but with a constant delay.
- Check that the ntp server is properly configured and running on the server side.
- Kevin Deldycke -
- Matthieu Diehr -
WebPing is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
For full details, please see the file named COPYING in the top directory of the source tree. You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.
Embedded external projects
WebPing uses external softwares, scripts, libraries and artworks: