...
In the remainder of this page we provide the details on:
- Prerequisites for installing the WiFiMon Test Server (WTS)
- WTS installation: Installation of a web server, the testtools used by WiFiMon and the images that are used for monitoring
- The JavaScript code that is required to be embedded in the frequently visited websites
This guide presents the commands required to install the WTS in a Debian-based distribution (Debian, Ubuntu, etc.). Other distributions may also be considered by adjusting the following commands appropriately.
1.
...
WiFiMon Test Server (WTS)
...
- An IP address (WTS_IP) configured for the WTS. This IP should be accessible from the WiFiMon Hardware Probes (WHP's) and WiFiMon Software Probes (WSP's), i.e. the end users of the Wi-Fi network.
- Optionally, you may associate an FQDN (WTS_FQDN) with the WTS_IP.
- We assume that WAS has already been installed in a separate machine. The FQDN of the WAS is denoted as WAS_FQDN.
In the sequel, we assume that an FQDN (WTS_FQDN) was selected.
2. WiFiMon Test Server (WTS) Installation
In the following, we detail the steps that are required to install the WiFiMon Test Server (WTS). Our installation was tested in Ubuntu 20.04 LTS. Notably, WiFiMon currently uses the Apache2 web server. However, readers could adjust the following setup to their preferred web server.
First, Apache2 web server should be installed using the following commands:
...
sudo apt-get update
sudo apt-get install -y apache2
sudo /etc/init.d/apache2 restart
Then, Apache2 mod_headers should be enabled with the following commands:
|
WiFiMon also requires enabling CORS. The following lines should be added in the /etc/apache2/apache2.conf file and Apache2 should then be restarted:
...
<Files ~
"\.(htm|html|css|dat|js|php|gif|jpg|png|swf)$"
>
Header always set Access-Control-Allow-Origin
"*"
Header always set Access-Control-Allow-Methods
"POST, GET, OPTIONS, DELETE, PUT"
Header always set Access-Control-Max-Age
"1000"
Header always set Access-Control-Allow-Headers
"x-requested-with, Content-Type, origin, authorization, accept, client-security-token"
</Files>
Installation
The WTS may be installed along with the WAS using the Ansible playbook that is described in the WAS documentation.
2. Embed Scripts in your Website
Finally, the required scripts and images should be uploaded to the root directory of the Apache2 web server, i.e. directly under /var/www/html. Download the required zip file and unzip it with the following commands:
...
wget https:
//bitbucket.software.geant.org/projects/WFMON/repos/agent/raw/wifimon.zip?at=refs%2Fheads%2Fmaster --output-document wifimon.zip
unzip wifimon.zip
A single modification is required in file "wifimon/js/nettest/nettest-swfobject.js". The variable "NetTest.FlashPath" should be configured to match the FQDN of the WiFiMon Test Server, i.e. WTS_FQDN.
3. Embed Scripts in your Website
The following paragraphs show the lines that should be included in the HTML code of the frequently-visited websites for each testtool. The FQDN of the WiFiMon Test Server (WTS) is denoted as WTS_FQDN, the FQDN of the WiFiMon Analysis Server (WAS) is denoted as WAS_FQDN and the name of the utilized testtool should be included in the testtool attribute.
...
2.1: Measurements test tools
Example pages for each test tool are available in the "measurements" folder of the "wifimon" directory that was downloaded in the previous section.
...
2.1.1: NetTest
NetTest measurements require embedding the following lines of code in your website:
...
- agentIP (required): Replace "WAS_FQDN" with the IP address (or domain name) of the WiFiMon Analysis Server.
- Replace "WTS_FQDN" with the IP address (or domain name) of the WiFiMon Test Server.
- imagesLocation (required): Public link to the folder where the images are downloaded to perform the NetTest measurements.
- testtool (required): With this attribute, you specify a name for the testtool. WiFiMon Analysis Server relies on the value of this attribute to visualize measurements. The following assumptions are made: (i) for websites visited by WiFiMon Software Probes the value of the testtool attribute should be specified as "NetTest", while (ii) for websites visited by WiFiMon Hardware Probes the testtool attribute should be specified as "NetTest-x" where x is the number description assigned to a particular WiFiMon Hardware Probe. particular WiFiMon Hardware Probe. Description can be a number, e.g. "5" or short text, e.g. "wifimon-5". Note that you must use separate websites for WiFiMon Software Probes and WiFiMon Hardware Probes.
- testServerLocation (optional): This attribute specifies the location (or name) of the WiFiMon Test Server within the monitored network.
- cookieTimeInMinutes (optional): Duration time (in minutes) to set the cookie in order to prevent repeated measurements and overload the WiFiMon Analysis Server. If empty, "1.5" is assumed, i.e. 90 seconds.
- If your website already included the jquery.min.js, you have to delete the first line.
- It is assumed that these lines are embedded in pages supporting HTTPS.
NOTE: Except for the 4th bullet, the rest of the bullets apply for both subsections 2.2 and 2.3. Thus, they will not be included in the following subsections.
...
2.1.2: Boomerang
Triggering boomerang measurements requires embedding the following lines of code in your website:
boomerang.html
...
- testtool (required): With this attribute, you specify a name for the testtool. WiFiMon Analysis Server relies on the value of this attribute to visualize measurements. The following assumptions are made: (i) for websites visited by WiFiMon Software Probes the value of the testtool attribute should be specified as "boomerang", while (ii) for websites visited by WiFiMon Hardware Probes the testtool attribute should be specified as "boomerang-x" where x is the number description assigned to a particular WiFiMon Hardware Probeparticular WiFiMon Hardware Probe. Description can be a number, e.g. "5" or short text, e.g. "wifimon-5". Note that you must use separate websites for WiFiMon Software Probes and WiFiMon Hardware Probes.
...
2.1.3: LibreSpeed Speedtest
Speedtest requires two steps.
...
- testtool (required): With this attribute, you specify a name for the testtool. WiFiMon Analysis Server relies on the value of this attribute to visualize measurements. The following assumptions are made: (i) for websites visited by WiFiMon Software Probes the value of the testtool attribute should be specified as "speedtest", while (ii) for websites visited by WiFiMon Hardware Probes the testtool attribute should be specified as "speedtest-x" where x is the number description assigned to a particular WiFiMon Hardware Probe. particular WiFiMon Hardware Probe. Description can be a number, e.g. "5" or short text, e.g. "wifimon-5". Note that you must use separate websites for WiFiMon Software Probes and WiFiMon Hardware Probes.
...
2.2: Combining Measurements in the Same Page
Including all three types of testtools (NetTest, Akamai Boomerang, LibreSpeed Speedtest) in your measurements requires injecting the following HTML lines in the "head" section of the website that is monitored by WiFiMon:
...