...
WiFiMon also requires enabling CORS. The following lines should be added in the /etc/apache2/apache2.conf file and Apache2: should should then be then restarted:
Code Block |
---|
<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. The contents of the "testtools" directory which are available from the WiFiMon code repository (https://bitbucket.software.geant.org/projects/WFMON/repos/agent/browse/testtools) should be copied in the root directory of Apache2.
...
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.
...
- 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.
- 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.
- If the above scripts will be embedded to HTTP websites, the attribute hostingWebsite should have the value "http" instead of "https". The value "https" is used for scripts that will be embedded in HTTPS websites.
- If the WiFiMon Analysis Server is configured to use the WiFiMon Non-Secure Processor, the attribute agentPort should have the value "9000" instead of "8443". The value "8443" is used if the WiFiMon Analysis Server is configured to use the WiFiMon Secure Processor.
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.2. boomerang
Triggering boomerang measurements requires embedding the following lines of code in your website:
Code Block | ||||
---|---|---|---|---|
| ||||
<html> <head> <script type="text/javascript" src="https://WTS_FQDN/wifimon/js/boomerang/jquery-3.5.1.min.js">> <script type="text/javascript" src="https://www.google.com/jsapi">> <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="8443" testtool="boomerang" imagesLocation="https://WTS_FQDN/wifimon/images/" cookieTimeInMinutes="" src="https://WTS_FQDN/wifimon/js/boomerang/boomerang-trigger.js" defer></script> </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 boomerang 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 "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.
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.
- If the above scripts will be embedded to HTTP websites, the attribute hostingWebsite should have the value "http" instead of "https". The value "https" is used for scripts that will be embedded in HTTPS websites.
If the WiFiMon Analysis Server is configured to use the WiFiMon Non-Secure Processor, the attribute agentPort should have the value "9000" instead of "8443". The value "8443" is used if the WiFiMon Analysis Server is configured to use the WiFiMon Secure Processor.
2.3. Speedtest/HTML5
Speedtest requires two steps.
...
Code Block | ||||
---|---|---|---|---|
| ||||
<!DOCTYPE html> <html> <head> <title>Speed worker</title> <script type="text/javascript" src="jquery-3.5.1.min.js"></script> <script type="text/javascript" src="https://www.google.com/jsapi"></script> <script type="text/javascript" id="settings" hostingWebsite="https" agentIp="fl-5-205.unil.cloud.switch.ch" agentPort="8443" testtool="speedtest" cookieTimeInMinutes="0.01" src="speedworker-post.js"></script> </head> </html> |
- agentIP (required): Replace "" 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.
- 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.
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.
- If the above scripts will be embedded to HTTP websites, the attribute hostingWebsite should have the value "http" instead of "https". The value "https" is used for scripts that will be embedded in HTTPS websites.
If the WiFiMon Analysis Server is configured to use the WiFiMon Non-Secure Processor, the attribute agentPort should have the value "9000" instead of "8443". The value "8443" is used if the WiFiMon Analysis Server is configured to use the WiFiMon Secure Processor.
3. Combining Measurements in the Same Page
...