##############################################################################
#
#   Copyright 2005 - 2007 - Doug Kapell as www.sillydns.com
#   Version 1.4 published by Jean Schumacher www.rotserver.lu
#  
#   This file is part of The Statusmon Service Monitoring program (Statusmon).
#
#   Statusmon 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; either version 2 of the License, or
#   (at your option) any later version.
#
#   Statusmon 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.
#
#   You should have received a copy of the GNU General Public License
#   along with Statusmon; if not, write to the Free Software
#   Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
#
##############################################################################
# 
#   Status Monitor - Free uptime and service monitoring script from www.rootserver.lu
#   
#
##############################################################################
----------------------------------------------
Instructions to set-up service status monitor:

**** New Installation ****

1) Upload all files to your webhosting account.
On servers with php running as apache module (mod_php) change permissions on db987.php to 666 (rw-rw-rw)
On servers with php running as CGI - FASTCGI - SU_PHP or PHP-FPM leave it at 6444 (rw-r-r)

2) Create a new database.

3) Point your browser to www.domain.com/install.php and select new install.

4) Delete the install.php

5) Browse to admin.php and edit servers, settings, and services to monitor as needed.

6) Set cron job to update statistics. This example is for a cpanel account and runs every 10 minutes. Change USERNAME to your username, and the path as needed.

*/10 * * * * php -q /home/USERNAME/public_html/upstat.php

7) Set cron job to archive and purge old uptime entries. This example is for a cpanel account and runs on the 1st of each month. Change USERNAME to your username, and the path as needed.

0 1 1 * * php -q /home/USERNAME/public_html/archive_cron.php

NOTE: It's probable best to rename archive_cron.php since there is no security to access it, unlike archive.php which requires a login.

**** Upgrade Instructions ****

1) Make a backup of your database and files!!!!

1) Upload all files to your webhosting account, EXCEPT the db987.php file.

3) Point your browser to www.domain.com/install.php and select upgrade.

4) Delete the install.php.

5) See step 7) from New Installation section



**** Notes: ****
- The file archive.php can be used to archive & purge date through a web browser. Only needs to be run once per month.
- The file archive_cron.php can be used to archive & purge date through a cron job. Only needs to be run once per month.
- If upgrading there is no need to edit your cron job.
- To perform manual update of the servers status point your browser to http://yourdomain.com/pathtofiles/upstat.php
- View service status: http://yourdomain.com/pathtofiles/status.php
- The reporter.php page should be accessing by the following format: reporter.php?serverid="ID" You can find the servers ID from the admin page.
- Alertra stats are enabled on a per server basis when the setting "Alertra Pin" and the server setting "abrv" are filled in.  This means some servers can show Alertra stats and others may not.
