Home‎ > ‎

Installation


Note regarding time zone settings
* Handling of timezones works best when the wpt, monitor, and tester installations are set to UTC.
The examples shown below assume the following
* Hostname is www.mywptbox.com
* WebPagetest currently installed in /var/www/html 
  and accessible via http://www.mywptbox.com/

Installation

Install Release Version

Download the desired release from Here

If installing "inside" an existing WebPagetest installation then extract the archive in the base location in which your WebPagetest is installed.

Example of installation on a linux box running WebPagetest

cd /tmp
wget http://code.webpagetest.org/svn/wptmonitor/releases/wptmonitor-0.2.0.tar.gz
tar zxvf wptmonitor-0.2.0.tar.gz
mv wptmonitor /var/www/html/.

Install From Subversion

Optionally you can checkout the latest version from subversion. 

Example of installation from SVN on a linux box

cd /tmp
svn co http://webpagetest.googlecode.com/svn/trunk/www/wptmonitorwptmonitor
svn export wptmonitor /var/www/html/wptmonitor

Initial Configuration

Navigate to http://www.mywptbox.com/wptmonitor/install.php

This will bring up the initial installation page.

Note: This will create the file ./db/wpt_monitor.sqlite containing the initial settings. 
If you wish to run install.php again you will have to delete the wpt_monitor.sqlite file. 
This is a safety feature to protect form accidentally overwriting the existing configuration.

Site Configuration

  • Site Name - The name of your WPTMonitor site.
  • Contact - The name of the contact person for the site.
  • Contact Email - The email address of contact.
  • Homepage Message - An optional message to be displayed on the "home" page.
  • Enable Registration - If enabled this will allow new users to register.
  • Default Jobs Per Month - This limits the number of job submissions that can be made each month.
The sum of job * locations * (43200/frequency)
If the user sets up 2 jobs that each execute
against 2 locations at a frequency of 15 minutes...

Job 1: 1 * 2 * (43200/15) = 5760
Job 1: 1 * 2 * (43200/15) = 5760
Total: 11,520
  • Job Processor Key - The key required to be passed in to execute the JobProcessor. It will be used for the cron job that calls curl localhost/wptmonitor/jobProcessor.php?key=<value>

Alert Information

  • From Name - The name that will appear on the emails sent out when an Alert is triggered.
  • From Email address - The return email address that will appear on the emails sent out when an Alert is triggered.
  • Email Message - Optional message to include with the Alert details.

WebPagetest Host Information

  • Label - Just a label to use for this location.
  • Conatct - Contact person for this WebPagetest instance.
  • Contact email address - Contacts email address.
  • Host Location URL - The url for the initial WebPagetest instance. Additional instances can be configured in the "hosts" section after installation. Be sure to use the real IP address or domain name for the instance as this is used to generate links to information on the WebPagetest site. If you leave it as 127.0.0.1 then you will have links rendered in your browser that will refer to your localhost instead of the WebPagetest instance.

Admin Information

  • Username - Admin user name.
  • Password - Password for admin user.
  • First Name - Admin's first name.
  • Last Name - Admin's last name.
  • Email Address - Admin's email address.

Scheduled ( cron ) Jobs

The Job Processor

  • The job processor scans all configured jobs to determine if it is time to submit a job. This process needs to be executed more frequently than the jobs frequency. For example... If you have a job that is configured to execute every 15 minutes the job processor needs to run at least every 15 minutes.
  • Additionally the job processor checks for results that may have not been "called back" for from the WebPagetest instance.
  • The final function of the job processor is to check for alert conditions and send emails if alerts are triggered.

Setting up the cron job on Linux

Create a simple shell script. We'll call it jobProcessor.sh

Add the following to the script.

curl localhost/wptmonitor/jobProcessor.php?key=<key> >> /var/www/html/wptmonitor/jobProcessor.log

Replace <key> with the value you used during installation ( install.php ).

>> /var/www/html/wptmonitor/jobProcessor.log is optional. The jobProcessor itself will log data to /var/www/html/wptmonitor/jobProcessor_log.html.

Create the crontab entry.

crontab -e

Then add the following line

*/5 * * * * /root/jobProcessor.sh

This particular entry will execute the job processor every 4 minutes. This allows for a maximum job frequency of 4 minutes. Adjust the frequency as desired.

Setting up the cron job on Windows

There are many utilities available to schedule job runs on Windows. The only one I've used is z-cron, which can be downloaded here...

http://www.z-cron.com/download.html

Comments