|
Fast, accurate and cheap website availability monitoring.
It's not easy to find a good, simple, cheap website availability monitoring system...
So we gave up looking and wrote our own...
Why pay every month for a commercial monitoring service, when your website can check itself?
Track Your Website's Uptime - To The Minute!
The system records your website's availability with a resolution of one minute, and can report outages with a latency of just 2 minutes (even most commercial services have a minimum latency of 15 minutes!).
| SiteMonitor - Agent | SiteMonitor - Stats |
 |
 |
There are 2 scripts in the package:
SiteMonitor: Agent
SiteMonitor: Agent is the script which does the availability checking. It's scheduled to run every minute.
How It Works
You install the scripts on the machine you want to monitor. When it's running OK, it updates a timestamp, when it isn't - it doesn't...
Every time SiteMonitor: Agent runs it requests a user-specified test page (via HTTP) from your site, and verifies that it arrives and contains some user-defined text. Every time a successful check is made, the current time is written to the database. If the time between successful runs is greater than a given latency period, then an outage is recorded
SiteMonitor Agent can run in 2 different modes: quiet (default) and visible.
Quiet mode is the one which gets run by the scheduler. It just reports 'Site Up' or 'Site Down' (so your cronlog doesn't get too big!).
Visible mode allows you to see what's going on in detail.
SiteMonitor: Stats
SiteMonitor Stats displays the monitoring results, and allows you to update your settings.
To see it running on this website click here: SiteMonitor Stats
Requirements
Installation
Before buying the script, please ensure you can complete this installation procedure:
- Download and unzip the scripts onto your PC. There are 4 files in the package.
- Enter your database login info in the 2 main scripts where indicated.
- Upload the scripts, style sheet, and phpinfo.php to the root directory of your website. This is the 'www' or 'public_html' directory. If you need an FTP tool, see the page on Telnet and FTP.
- Cut and Paste the database definitions from this page into your database. You can enter SQL commands directly into PHPMyAdmin - which you're bound to have if you've got MySQL. See your webhosting control panel or ask your host!
- Database Table Definitions: (Cut and Paste!)
/*------------*/ /* Monitoring */ /*------------*/ CREATE TABLE sm_lastcheck ( check_t INT UNSIGNED );
/*--------*/ /* Events */ /*--------*/ CREATE TABLE sm_events ( event_id INT UNSIGNED AUTO_INCREMENT, ev_type VARCHAR(10) NOT NULL, ev_start INT UNSIGNED, ev_end INT UNSIGNED, PRIMARY KEY (event_id) );
/*----------*/ /* Settings */ /*----------*/ CREATE TABLE sm_settings ( check_url VARCHAR(100) NOT NULL, search_text VARCHAR(20) NOT NULL, latency INT UNSIGNED NOT NULL );
INSERT INTO sm_settings VALUES ('http://localhost/sitemon-test.txt', 'AllOK', 600);
- Run phpinfo.php - you just have to access it in your browser and it will tell you all about your PHP installation. for example: http://web-bureau.com/phpinfo.php. Look at the third line down: Server API. If it says 'CGI' then your PHP is installed as a CGI module, else it's an Apache module!
- Add (something like) the following line to your crontab file (or use your host's control panel if you don't have direct access to it):
- PHP As CGI Module:
* * * * * php -q /yourlocalpath/sitemon.php >/dev/null 2>&1
- Where yourlocalpath is the real directory on your webhost. You can get this by looking in the 'Environment' section of your phpinfo page. It's the DOCUMENT_ROOT value.
- PHP As Apache Module:
- * * * * * lynx -dump http://YourDomain.com/sitemon.php
- That's It! It's now up and running and recording your website's availablity every minute. Check the stats page for a report !
For more info on cron see the cron man page.
TWB: SiteMonitor - Website Availability Monitoring Script costs less than a month's premium monitoring at a large number of monitoring websites!
This page is currently being updated. Check back soon.
|