Installation
============

The Hiawatha Monitor has been built upon the Banshee PHP framework. Use the
following steps to install a Banshee based website.


Configure your webserver
------------------------
Use the following Hiawatha configuration for this website.

	UrlToolkit {
		ToolkitID = monitor
		RequestURI isfile Return
		Match ^/(css|files|fonts|images|js)(/|$) Return
		Match ^/(favicon.ico|robots.txt)$ Return
		Match [^?]*(\?.*)? Rewrite /index.php$1
	}

	VirtualHost {
		Hostname = monitor.domain.com
		WebsiteRoot = /var/www/monitor/public
		StartFile = index.php
		AccessLogfile = /var/www/monitor/logfiles/access.log
		ErrorLogfile = /var/www/monitor/logfiles/error.log
		ExecuteCGI = yes
		UseFastCGI = PHP # Use if you use PHP as a FastCGI daemon
		TimeForCGI = 15
		UseToolkit = monitor
	}


Configure PHP
-------------
The Hiawatha Monitor requires at least PHP v5.6 and needs the MySQL and XML/XSLT
PHP modules.


Configure your database
-----------------------
Open the website in your browser and follow the instructions on your screen. In
case of an error, add /setup to the URL.


Configure the Cron daemon
-------------------------
Use the following crontab settings to fetch the information from the webservers
and to send the daily reports:

	*/5 * * * * /path/to/monitor/website/database/fetch_webserver_logs
	0   0 * * * /path/to/monitor/website/database/delete_old_logs
	59 23 * * * /path/to/monitor/website/database/send_reports


Using the Hiawatha Monitor
--------------------------
Login with username 'admin' and password 'monitor' and start adding webservers
in the Webserver Administration page. Add the following line to the
configuration file of your Hiawatha webservers.

	MonitorServer = <IP of monitor server> 

Don't forget to change the admin password and to check out the settings in the
Settings administration CMS page. When you're done testing, set DEBUG_MODE in
the file settings/banshee.conf to 'no' and remove the setup module from the
file settings/public_pages.conf.
