Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. Prerequisites for installing the WiFiMon Test Server (WTS)
  2. WTS installation: Installation of a web server, the testtools used by WiFiMon and the images that are used for monitoring
  3. The JavaScript code that is required to be embedded in the frequently visited websites

...

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:

sudo a2enmod headers
sudo service apache2 restart


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>

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:

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.

...

NetTest measurements require embedding the following lines of code in your website:



nettest.html

<html>
<head>
   <script type="text/javascript" src="https://WTS_FQDN/wifimon/js/nettest/jquery-3.6.0.min.js"></script>
   <script type="text/javascript" src="https://WTS_FQDN/wifimon/js/nettest/nettest-swfobject.js"></script>
   <script type="text/javascript" src="https://www.google.com/jsapi"></script>
   <script type="text/javascript" id="settings" hostingWebsite="https" agentIp="WAS_FQDN" agentPort="443" testtool="NetTest" testServerLocation="LOCATION" imagesLocation="https://WTS_FQDN/wifimon/images/" cookieTimeInMinutes="0.01"
            src="https://WTS_FQDN/wifimon/js/nettest/runtests.js" defer></script>
<!--meta http-equiv="refresh" content="30" -->
</head>
</html>

  • 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 assigned to a particular WiFiMon Hardware Probe. 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.

...

Triggering boomerang measurements requires embedding the following lines of code in your website:
boomerang.html

<html>
<head>
       <script type="text/javascript" src="https://WTS_FQDN/wifimon/js/boomerang/jquery-3.6.0.min.js"></script>
       <script type="text/javascript" src="https://www.google.com/jsapi"></script>
       <script src="https://WTS_FQDN/wifimon/js/boomerang/boomerang.js" type="text/javascript"></script>
       <script src="https://WTS_FQDN/wifimon/js/boomerang/bw.js" type="text/javascript"></script>
       <script src="https://WTS_FQDN/wifimon/js/boomerang/rt.js" type="text/javascript"></script>
       <script type="text/javascript" id="settings" hostingWebsite="https" agentIp="WAS_FQDN" agentPort="443" testtool="boomerang" testServerLocation="LOCATION" imagesLocation="https://WTS_FQDN/wifimon/images/" cookieTimeInMinutes=""
                   src="https://WTS_FQDN/wifimon/js/boomerang/boomerang-trigger.js" defer></script>
</head>
</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 assigned to a particular WiFiMon Hardware Probe. Note that you must use separate websites for WiFiMon Software Probes and WiFiMon Hardware Probes.

...

Step 1: Create the following proxy HTML page in the "measurements" folder of the "wifimon" directory that was downloaed in the previous section:
speedtest.html

<!DOCTYPE html>
<html>
<body>
<iframe src="https://WTS_FQDN/wifimon/js/speedtest/speedworker.html" style="visibility: hidden;"></iframe>
<body/>
</html>

Step 2: Create the following HTML page with name "speedworker.html" in the "js/speedworker" folder of the "wifimon" directory that was downloaded in the previous section:

speedworker.html

<!DOCTYPE html>
<html>
<head>
<title>Speed worker</title>
    <script type="text/javascript" src="jquery-3.6.0.min.js"></script>
    <script type="text/javascript" src="https://www.google.com/jsapi"></script>
    <script type="text/javascript" id="settings" hostingWebsite="https" agentIp="WAS_FQDN" agentPort="443" testtool="speedtest" testServerLocation="LOCATION" cookieTimeInMinutes="0.01"
         src="speedworker-post.js"></script>
</head>
</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 "speedtest", while (ii) for websites visited by WiFiMon Hardware Probes the testtool attribute should be specified as "speedtest-x" where x is the number assigned to a particular WiFiMon Hardware Probe. Note that you must use separate websites for WiFiMon Software Probes and WiFiMon Hardware Probes.

...

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:

<iframe src="https://WTS_FQDN/wifimon/measurements/nettest.html" style="visibility: hidden;"></iframe>
<iframe src="https://WTS_FQDN/wifimon/measurements/boomerang.html" style="visibility: hidden;"></iframe>
<iframe src="https://WTS_FQDN/wifimon/js/speedtest/speedworker.html" style="visibility: hidden;"></iframe>

where nettest.html, speedworker.html, boomerang.html include the JavaScript lines that trigger the necessary tests. These files were detailed above.