Difference between revisions of "Pandora: Documentation en: WUX Monitoring"

From Pandora FMS Wiki
Jump to: navigation, search
(Configuration)
 
(28 intermediate revisions by 4 users not shown)
Line 1: Line 1:
=WEB User experience transactional monitoring (WUX) =
+
= WEB User experience transactional monitoring (WUX) =
  
 
== Introduction ==
 
== Introduction ==
  
Pandora WUX is a Pandora FMS internal component, which allows users to automate web browser interaction. This creates a report in Pandora FMS with results of each execution, time lapsed and screenshots with errors found. WUX can split sessions in phases to let you know where the problem or bottleneck is. Pandora WUX uses browser robot (PWRD - Pandora WEB Robot Daemon) to automate browser sessions.
+
Pandora WUX is a Pandora FMS internal component, which allows users to automate web browser interaction.  
  
== Pandora Web Robot Daemon (PWRD) ==
+
In order to work, WUXServer must be connected to a Pandora Web Robot Daemon (PWRD) server.
  
Pandora Web Robot Daemon is a service, which provides tools to automate web browser sessions. It's available in our  [https://library.pandorafms.com module library]. It contains:
+
PWRD is a service that executes step by step pre-recorded actions by the user in a web portal.
 +
 
 +
To achieve this, PWRD uses Selenium web automation technology.
 +
 
 +
It is therefore imperative that the user shows Pandora WUXServer the actions that must be performed to navigate through the web portal.
 +
 
 +
With this data, Pandora WUXServer will generate a report with the results of the performances, time spent, and screenshots with the possible errors found.
 +
 
 +
Pandora WUXServer is able to split the browsing sessions into phases, which simplifies the view and helps us to debug possible bottlenecks.
 +
 
 +
 
 +
<br>
 +
[[File:wux_simple.png|center]]
 +
<br>
 +
 
 +
== Configuration ==
 +
 
 +
In order to enable WUXServer on our Pandora FMS server,we will need to configure the <b>Pandora Web Robot service (PWRD)</b>
 +
 
 +
=== Pandora Web Robot Daemon (PWRD) ===
 +
 
 +
Pandora Web Robot Daemon is a service, which provides tools to automate web browser sessions, using a file containing a list of necessary actions in order to navigate the user's web portal.  
 +
 
 +
It comes integrated with the Pandora server and we can find it in the folder /usr/share/pandora_server/util/pwrd when installing the Enterprise server (Linux) or in the module library (Windows)
 +
 
 +
It contains:
  
 
* Firefox 46 Binary for Windows.
 
* Firefox 46 Binary for Windows.
* Firefox customized profile to record and execute web browser sessions.
+
* Pre-built profile to perform web browser sessions.
* Server for session automation.
+
* Server for session automation (Selenium server).
* Web browser recorder (.XPI)
+
 
  
===Installation on Linux===
+
=== Installation on Linux===
  
Install JAVA for correct operation of '''pwrd''' daemon
+
The Selenium component of the PWRD daemon requires java in order to work, we will need to install it:
  
 
   yum install java  
 
   yum install java  
  
 +
In order for PWRD to be able to launch Firefox on our Linux server, it will be necessary to install xorg-x11-server-Xvfb and gtk2 to be able to virtualize graphical environments.
  
Install xorg-x11-server-Xvfb to be able to virtualize graphical environments.
+
yum install xorg-x11-server-Xvfb gtk2
  
yum install xorg-x11-server-Xvfb
+
If its not available in your repos, you can find the RPMs files in following links:
 +
ftp://rpmfind.net/linux/centos/6.6/os/x86_64/Packages/xorg-x11-server-Xvfb-1.15.0-22.el6.centos.x86_64.rpm
  
If its not available in your repos, you can find the RPM file in following link:
+
ftp://rpmfind.net/linux/centos/7.4.1708/os/x86_64/Packages/gtk2-2.24.31-1.el7.x86_64.rpm
  
ftp://rpmfind.net/linux/centos/6.6/os/x86_64/Packages/xorg-x11-server-Xvfb-1.15.0-22.el6.centos.x86_64.rpm
+
To do the RPMs installation manually:
  
To do the RPM installation, just execute in a root console:
+
yum install xorg-x11-server-Xvfb-1.15.0-22.el6.centos.x86_64.rpm
 +
yum install gtk2-2.24.31-1.el7.x86_64.rpm
  
  yum install xorg-x11-server-Xvfb-1.15.0-22.el6.centos.x86_64.rpm
+
Then, proceed to install PWRD daemon, which can be found in the folder /usr/share/pandora_server/util/pwrd/ when installing the Enterprise server.
  
  Then, proceed to install PWRD daemon, which can be found in ''/usr/share/pandora_server/util/pwrd/'' when you install Enterprise Pandora FMS server.
+
  sudo /bin/bash /usr/share/pandora_server/util/pwrd/install_pwrd.sh --install
  
unzip PWRD_server.zip
+
Once installed, we must start it.  
cd PWRD_server/
 
sudo /bin/bash install_pwrd.sh --install
 
  
Once installed, you have several working modes:
+
PWRD provides several working modes:
  
* '''Standalone''':  This is the standard mode; it will launch a single PWRD instance, which will be assigned to a Pandora FMS server.
+
* '''Standalone''':  This is the standard mode; it will launch a single PWRD instance, each will be assigned to a Pandora FMS server.
  
* '''HUB''': Concentrator mode. In this mode, PWRD service will not evaluate browser sessions directly; instead, "nodes" will have to be registered to execute tasks. This is also called '''cluster mode'''. Each HUB will be assigned to a Pandora FMS server.
+
* '''HUB''': Concentrator mode. In this mode, PWRD service will not evaluate browser sessions directly; instead, "nodes" will have to be registered to execute tasks. This is the cluster mode from the PWRD service. Each HUB will be assigned to a Pandora FMS server.
  
* '''Node''': In this mode, each node works behind a concentrator or HUB. All checks to be executed will have to be requested by the HUB, which will assign them to the node with the lesser workload. We can use several nodes to a single hub to escalate in order to be able to do more requests in parallel.
 
  
 
====PWRD in "Standalone" mode ====
 
====PWRD in "Standalone" mode ====
  
Start
+
PWRD in standalone mode, will start the daemon and will prepare it to execute the actions indicated by the user through WUXServer.
 +
 
 +
<br>
 +
[[File:wux_pwrd_standalone.png|center]]
 +
<br>
  
 +
# Start
 
  /etc/init.d/pwrd start
 
  /etc/init.d/pwrd start
  
Get status
+
#Get status
 
 
 
  /etc/init.d/pwrd status
 
  /etc/init.d/pwrd status
  
Stop it
+
# Stop it
 
  /etc/init.d/pwrd stop
 
  /etc/init.d/pwrd stop
  
Once started, we can assign executions from our web sessions, configuring parameter ''wux_host'' as this system IP address and '''wux_port''' port 4444 (default).
+
 
  
 
====PWRD in "HUB" mode====
 
====PWRD in "HUB" mode====
  
Start
+
Concentrator mode or HUB will start the daemon as a load balancer. In this working mode, the system will balance the load between all nodes registered in the system, assigning the execution of the navigation sessions, depending on their workload.
 +
 
 +
You can always check the status of the HUB by accessing the HUB administration console:
 +
 
 +
http://hub:4444/grid/console
 +
 
 +
<br>
 +
[[File:wux_pwrd_hub.png|center]]
 +
<br>
 +
 
 +
# Start
 
  /etc/init.d/pwrd start-hub
 
  /etc/init.d/pwrd start-hub
  
Get status
+
# Get status
 
  /etc/init.d/pwrd status-hub
 
  /etc/init.d/pwrd status-hub
  
Stop it
+
# Stop it
 
  /etc/init.d/pwrd stop-hub
 
  /etc/init.d/pwrd stop-hub
  
  
Concentrator mode or HUB will start the daemon as a load balancer. In this working mode, the system will balance the load between all registered nodes, giving sessions to each node, depending on their workload.
 
  
====PWRD in "NODE" mode====
+
=====Add PWRD nodes to our HUB=====
 +
 
 +
To add a new PWRD node, you will need:
 +
 
 +
* A hub (PWRD in HUB mode)
 +
* PWRD files, on the same or different machine
 +
* TCP/4444 connectivity from the computer that hosts the node to the computer that hosts the HUB.
  
Start
+
In this work mode, the service will process all queued <b>requests from the hub (HUB)</b>, returning the results of the executions to it. It will be the HUB who will speak exclusively with the WUXServer, being transparent to the one who is executing the actions of the user.
/etc/init.d/pwrd start-node http://hub:4444/grid/register
 
  
Get status
+
 
 +
  # Start and register in the HUB, replace "hub" with the server IP PWRD HUB
 +
  /etc/init.d/pwrd start-node http://hub:4444/grid/register
 +
 
 +
Check status
 
  /etc/init.d/pwrd status-node
 
  /etc/init.d/pwrd status-node
  
Stop it
+
Stop it
 
  /etc/init.d/pwrd stop-node
 
  /etc/init.d/pwrd stop-node
  
Node mode needs a concentrator (PWRD in HUB mode) in order to work. In this working mode, service will take queued sessions from the concentrator, and returning the results.
+
==== Pandora Server Configuration====
  
On any of these three modes, we need to setup our Pandora FMS WUX Server to use the IP address and port of the PWRD daemon we have installed, running as standalone or hub.
+
Regardless of the chosen mode, once started, we can start assigning executions of our browsing sessions, adding the configuration parameters of WUXServer to the configuration file of our Pandora server.
  
Configuration example for the pandora_server.conf:
+
Assuming that we have deployed our PWRD server on the same server that runs our Pandora FMS server, we would add the following configuration:
  
 +
# add to /etc/pandora/pandora_server.conf
 
  wuxserver 1
 
  wuxserver 1
  wux_host 192.168.70.33
+
  wux_host 127.0.0.1
 
  wux_port 4444
 
  wux_port 4444
  
 
=== Installation on Windows ===
 
=== Installation on Windows ===
  
Steps to prepare a working environment for Pandora WUX.
+
Steps to prepare a working environment for Pandora WUX on Windows.
 +
 
 +
<b>Nota</b>: We strongly recommend Linux to host the PWRD service.
  
 +
You can get the files needed for your deployment of the module library in https://library.pandorafms.com/index.php?sec=Library&sec2=repository&lng=en&action=view_PUI&id_PUI=816
  
 
==== PWRD deployment on Windows systems ====
 
==== PWRD deployment on Windows systems ====
  
 
Prerequisites:
 
Prerequisites:
 +
* Download [https://library.pandorafms.com/index.php?sec=Library&sec2=repository&lng=es&action=view_PUI&id_PUI=816 PWRD server ]
 +
 
* Install Java 1.8 on the machine.
 
* Install Java 1.8 on the machine.
 
* Install Firefox 47.0.1 (download from https://ftp.mozilla.org/pub/firefox/releases/47.0.1/).
 
* Install Firefox 47.0.1 (download from https://ftp.mozilla.org/pub/firefox/releases/47.0.1/).
Line 115: Line 168:
 
* Export Firefox profile to C:\PWR\profile
 
* Export Firefox profile to C:\PWR\profile
  
Using a profile for the checks is not essential, however its use is recommended especially when using proxy or when using autocomplete passwords.
+
Using a profile for the checks is not essential, however it is recommended especially when using proxy or when using autocomplete passwords.
 
To create a profile of Firefox follow the steps in the following screenshots:
 
To create a profile of Firefox follow the steps in the following screenshots:
  
Line 140: Line 193:
 
  net start PWRSRV
 
  net start PWRSRV
  
From this moment we have the Selenium server running on your machine. However, we can run it manually (by stopping the service previously) if we want to carry out '' debugging '' tasks, using the following command:
+
From this moment you have the Selenium server running on your machine. However, we can run it manually (by previously stopping the service) if we want to carry out ''debugging'' tasks, using the following command:
  
 
  java -jar selenium-server-standalone-2.53.1.jar -firefoxProfileTemplate C:\selenium\firefox_profile -port 4444 -v
 
  java -jar selenium-server-standalone-2.53.1.jar -firefoxProfileTemplate C:\selenium\firefox_profile -port 4444 -v
 
 
  
 
== To record a PWR session ==
 
== To record a PWR session ==
  
Before monitoring a user experience we should do the recording. Depending on the type of technology we have chosen, we will use either on recording system or another.
+
Before monitoring a user experience we must record the actions we want the system to perform, in order to browse through our web portal
  
To record a PWR browsing , we will need:
+
To do this we have available the "PWR recorder" utility in the [https://pandorafms.com/library/pandora-ux-and-wux-pwr-recorder/ module library].
* Firefox Web browser version 47.0.1  (download from https://ftp.mozilla.org/pub/firefox/releases/47.0.1/).
 
* Selenium IDE ‘’add-on’’ (download from: https://addons.mozilla.org/es/firefox/addon/selenium-ide/).
 
  
To properly install the 47.0.1 version of Firefox, it  must be downloaded from the URL provided above. Windows systems will have to add the executable to the system PATH.
+
Run the downloaded file to start the recording environment.
 +
Once the environment is started, you can access the recorder by clicking on the following button:
  
 
<br>
 
<br>
[[File:ux6.JPG|center|800px]]
+
[[File:iniciar_grabador.png|center]]
 
<br>
 
<br>
  
Once downloaded, it will show the icon of the recording environment through Firefox customization options:
 
  
<br>
+
You should see a window like the one shown in the image:
[[File:ux7.JPG|center]]
 
<br>
 
[[File:ux9.JPG|center|800px]]
 
<br>
 
  
Once the access is placed, we will start the recorder:
 
  
 
<br>
 
<br>
Line 174: Line 218:
 
<br>
 
<br>
  
From this moment we can browse the website we want to monitor  and the different actions of every step we take, will appear on the recorder.
 
  
To stop recording, use the following button at the top right of the recorder:
+
From this moment we will be able to browse the website that we want to monitor and the different actions of each step that we advance will appear in the recorder.
 +
 
 +
To stop recording we will use the following button, located at the top right of the recorder:
 +
 
  
 
<br>
 
<br>
Line 182: Line 228:
 
<br>
 
<br>
  
Once this actions are completed, we can carry out checks on the page, like checking the existence of a certain text in order to ensure that the loaded page is correct. To do this, we right click on a section of text in the browser window as we continue recording, and select the '' verifyText '' option:
+
 
 +
After completing the actions, we can perform checks on the page, for example verify the existence of a certain text to ensure that the page loaded is correct. To do this we will right click on a section of text in the browser window while we continue to record, and select the option ''verifyText'':
  
 
<br>
 
<br>
Line 188: Line 235:
 
<br>
 
<br>
  
Aparecerá un nuevo paso en el grabador indicando la acción de comprobación de texto indicada:
+
A new step will appear in the recorder indicating the said text checking action:
  
 
<br>
 
<br>
 
[[File:ux14.JPG|center]]
 
[[File:ux14.JPG|center]]
 
<br>
 
<br>
 +
  
 
We can reproduce the entire sequence using the button ''Play Entire test suite'' and check that successfully completes:
 
We can reproduce the entire sequence using the button ''Play Entire test suite'' and check that successfully completes:
Line 200: Line 248:
 
<br>
 
<br>
  
After verifying the validity of the sequence of navigation, save it (File -> Save Test Case) and then run it with Pandora UX. The resulting file is a HTML document that Pandora UX will interpret.
+
 
 +
After verifying the validity of the sequence of navigation, save it (File -> Save Test Case).This will be the file that we will load when creating a new web analysis module in our Pandora console.
 +
 
  
 
=== Record a transactional session for Pandora WUX ===
 
=== Record a transactional session for Pandora WUX ===
Line 209: Line 259:
  
 
<br>
 
<br>
[[File:ux16.JPG|center]]
+
[[File:pwrd_recorder_transaction.PNG|center]]
 
<br>
 
<br>
  
Line 216: Line 266:
 
  phase_start:name_of_phase
 
  phase_start:name_of_phase
  
Phase encompass the time and result of all commands that exist up until the following comment:
+
The Phase will encompass the time and result of all commands that exist up until the following comment:
  
 
  phase_end:name_of_phase
 
  phase_end:name_of_phase
Line 222: Line 272:
 
All commands that are run between a phase_start y phase_end label will be covered in this phase.
 
All commands that are run between a phase_start y phase_end label will be covered in this phase.
  
 +
<br>
 +
[[File:pwrd_recorder_transaction2.PNG|center]]
 +
<br>
  
 
== Creating a Web Analytics module in Pandora FMS Console ==
 
== Creating a Web Analytics module in Pandora FMS Console ==
Line 227: Line 280:
 
Once we have our browsing session recorded, it's time to deploy it as a module in Pandora FMS console.
 
Once we have our browsing session recorded, it's time to deploy it as a module in Pandora FMS console.
  
To do so , we will access to '''any agent associated with a server with WUX feature enabled''' and create a module "Web analysis":
+
To do so , we will access to '''any agent associated with a server with WUX feature enabled''' and we will create a module "Web analysis":
  
 
[[File:Wux_module.PNG|center|400px]]
 
[[File:Wux_module.PNG|center|400px]]
Line 233: Line 286:
  
  
After selecting "create" we must fill in all fields that the form presents:
+
 
 +
After selecting "create" we must fill in all fields showed in the form:
  
 
[[File:Wux_new_module_form.PNG|center|800px]]
 
[[File:Wux_new_module_form.PNG|center|800px]]
  
Module Name: Module WUX (Father), all sub-modules with monitoring results will be dependent on this new module.
+
* Module Name: Module WUX (Father), all sub-modules with monitoring results will be dependent on this new module.
 
* Target Web site: For monitoring performance statistics of website.
 
* Target Web site: For monitoring performance statistics of website.
 
* Run performance test: Indicates that we want to monitor not only the browsing experience, but also the performance statistics of access to the target web site.
 
* Run performance test: Indicates that we want to monitor not only the browsing experience, but also the performance statistics of access to the target web site.
Line 275: Line 329:
 
"n" may be an unsigned number (positive) or negative.
 
"n" may be an unsigned number (positive) or negative.
  
Y FORMAT follows the standard [http://search.cpan.org/~dexter/POSIX-strftime-GNU-0.02/lib/POSIX/strftime/GNU.pm strftime de perl]
+
And FORMAT follows the standard [http://search.cpan.org/~dexter/POSIX-strftime-GNU-0.02/lib/POSIX/strftime/GNU.pm strftime de perl]
  
  
Line 287: Line 341:
  
  
== Viewing the data ==
+
== Data viewing ==
  
 
The information generated by WUX is displayed in modules as follows. Enabling view '' hierarchically '' in the list of modules, will help us to display the information much more clearly:
 
The information generated by WUX is displayed in modules as follows. Enabling view '' hierarchically '' in the list of modules, will help us to display the information much more clearly:
Line 299: Line 353:
  
 
* ''module''_Global_Status: Indicates the  '''global''' state of complete browsing.
 
* ''module''_Global_Status: Indicates the  '''global''' state of complete browsing.
* ''module''_Global_Time: Indicates the global time lapsed of complete browsing.
+
* ''module''_Global_Time: Indicates the '''global''' time lapsed of complete browsing.
 
* ''module''_Global_Screenshot: contains an image with the result of browsing error, '''it will be generated only in case of error'''
 
* ''module''_Global_Screenshot: contains an image with the result of browsing error, '''it will be generated only in case of error'''
 
* ''module''_Phase X: ''Name of phase''_Status: Indicates the status of the browsing in Phase X
 
* ''module''_Phase X: ''Name of phase''_Status: Indicates the status of the browsing in Phase X
 
* ''module''_Phase X: ''Name of phase''_Time: Indicates time lapsed in Phase X
 
* ''module''_Phase X: ''Name of phase''_Time: Indicates time lapsed in Phase X
  
 +
Example: Error capture view.
  
 +
<br>
 +
[[File:Wux_screenshot.png|center|800px]]
 +
<br>
  
{{warning|Attention: If you upgraded from versions prior to Pandora FMS 712 7.0NG you must make a small change.}}
+
{{warning|Attention: If you upgraded from versions prior to Pandora FMS 7.0NG 712 you must make a small change.}}
  
 
In order to store the screenshots generated by WUXServer, you must execute the following operations on your database schema:
 
In order to store the screenshots generated by WUXServer, you must execute the following operations on your database schema:
Line 313: Line 371:
 
  alter table tagente_datos_string modify column datos mediumtext;
 
  alter table tagente_datos_string modify column datos mediumtext;
  
{{Warning|If you don't execute this actions, your screenshots may be incomplete or cropped.}}
+
If you don't execute this actions, your screenshots may be incomplete or cropped
  
Accessing the ''WUX'' section Agent can view additional details of the transaction and its phases:
+
Accessing the ''WUX'' section Agent , we can view additional details of the transaction and its phases:
  
 
<br>
 
<br>
Line 322: Line 380:
  
  
In the screenshot above you can see the difference in time of the two phases that our record is divided into as well as access statistics to the front gate.
+
In the screenshot above you can see the difference in time of the two phases that our record is divided into as well as access statistics to the front portal.
  
  
Website statistics are summarized in the following:
+
Website statistics are summarized in the following concepts:
  
 
* '''Stats_TT''': Total time to obtain the website.
 
* '''Stats_TT''': Total time to obtain the website.
Line 348: Line 406:
 
* Alerts on thresholds times
 
* Alerts on thresholds times
 
* Emails warning template set as "always" for screenshots modules of results
 
* Emails warning template set as "always" for screenshots modules of results
 +
 +
 +
 +
== New widgets for Dashboards ==
 +
 +
To be able to display user browsing information, two new widget types have been added:
 +
 +
Widget for status of browsing phases
 +
<br>
 +
[[File:widget_wux_fases.PNG|center]]
 +
<br>
 +
 +
 +
 +
Widget for website statistics
 +
<br>
 +
[[File:widget_wux_stats.PNG|center]]
 +
<br>

Latest revision as of 08:47, 8 November 2018

1 WEB User experience transactional monitoring (WUX)

1.1 Introduction

Pandora WUX is a Pandora FMS internal component, which allows users to automate web browser interaction.

In order to work, WUXServer must be connected to a Pandora Web Robot Daemon (PWRD) server.

PWRD is a service that executes step by step pre-recorded actions by the user in a web portal.

To achieve this, PWRD uses Selenium web automation technology.

It is therefore imperative that the user shows Pandora WUXServer the actions that must be performed to navigate through the web portal.

With this data, Pandora WUXServer will generate a report with the results of the performances, time spent, and screenshots with the possible errors found.

Pandora WUXServer is able to split the browsing sessions into phases, which simplifies the view and helps us to debug possible bottlenecks.



Wux simple.png


1.2 Configuration

In order to enable WUXServer on our Pandora FMS server,we will need to configure the Pandora Web Robot service (PWRD)

1.2.1 Pandora Web Robot Daemon (PWRD)

Pandora Web Robot Daemon is a service, which provides tools to automate web browser sessions, using a file containing a list of necessary actions in order to navigate the user's web portal.

It comes integrated with the Pandora server and we can find it in the folder /usr/share/pandora_server/util/pwrd when installing the Enterprise server (Linux) or in the module library (Windows)

It contains:

  • Firefox 46 Binary for Windows.
  • Pre-built profile to perform web browser sessions.
  • Server for session automation (Selenium server).


1.2.2 Installation on Linux

The Selenium component of the PWRD daemon requires java in order to work, we will need to install it:

 yum install java 

In order for PWRD to be able to launch Firefox on our Linux server, it will be necessary to install xorg-x11-server-Xvfb and gtk2 to be able to virtualize graphical environments.

yum install xorg-x11-server-Xvfb gtk2

If its not available in your repos, you can find the RPMs files in following links: ftp://rpmfind.net/linux/centos/6.6/os/x86_64/Packages/xorg-x11-server-Xvfb-1.15.0-22.el6.centos.x86_64.rpm

ftp://rpmfind.net/linux/centos/7.4.1708/os/x86_64/Packages/gtk2-2.24.31-1.el7.x86_64.rpm

To do the RPMs installation manually:

yum install xorg-x11-server-Xvfb-1.15.0-22.el6.centos.x86_64.rpm
yum install gtk2-2.24.31-1.el7.x86_64.rpm

Then, proceed to install PWRD daemon, which can be found in the folder /usr/share/pandora_server/util/pwrd/ when installing the Enterprise server.

sudo /bin/bash /usr/share/pandora_server/util/pwrd/install_pwrd.sh --install

Once installed, we must start it.

PWRD provides several working modes:

  • Standalone: This is the standard mode; it will launch a single PWRD instance, each will be assigned to a Pandora FMS server.
  • HUB: Concentrator mode. In this mode, PWRD service will not evaluate browser sessions directly; instead, "nodes" will have to be registered to execute tasks. This is the cluster mode from the PWRD service. Each HUB will be assigned to a Pandora FMS server.


1.2.2.1 PWRD in "Standalone" mode

PWRD in standalone mode, will start the daemon and will prepare it to execute the actions indicated by the user through WUXServer.


Wux pwrd standalone.png


# Start 
/etc/init.d/pwrd start
#Get status
/etc/init.d/pwrd status
# Stop it
/etc/init.d/pwrd stop


1.2.2.2 PWRD in "HUB" mode

Concentrator mode or HUB will start the daemon as a load balancer. In this working mode, the system will balance the load between all nodes registered in the system, assigning the execution of the navigation sessions, depending on their workload.

You can always check the status of the HUB by accessing the HUB administration console:

http://hub:4444/grid/console


Wux pwrd hub.png


# Start
/etc/init.d/pwrd start-hub
# Get status
/etc/init.d/pwrd status-hub
# Stop it
/etc/init.d/pwrd stop-hub


1.2.2.2.1 Add PWRD nodes to our HUB

To add a new PWRD node, you will need:

  • A hub (PWRD in HUB mode)
  • PWRD files, on the same or different machine
  • TCP/4444 connectivity from the computer that hosts the node to the computer that hosts the HUB.

In this work mode, the service will process all queued requests from the hub (HUB), returning the results of the executions to it. It will be the HUB who will speak exclusively with the WUXServer, being transparent to the one who is executing the actions of the user.


 # Start and register in the HUB, replace "hub" with the server IP PWRD HUB
 /etc/init.d/pwrd start-node http://hub:4444/grid/register
Check status
/etc/init.d/pwrd status-node
Stop it
/etc/init.d/pwrd stop-node

1.2.2.3 Pandora Server Configuration

Regardless of the chosen mode, once started, we can start assigning executions of our browsing sessions, adding the configuration parameters of WUXServer to the configuration file of our Pandora server.

Assuming that we have deployed our PWRD server on the same server that runs our Pandora FMS server, we would add the following configuration:

# add to /etc/pandora/pandora_server.conf
wuxserver 1
wux_host 127.0.0.1
wux_port 4444

1.2.3 Installation on Windows

Steps to prepare a working environment for Pandora WUX on Windows.

Nota: We strongly recommend Linux to host the PWRD service.

You can get the files needed for your deployment of the module library in https://library.pandorafms.com/index.php?sec=Library&sec2=repository&lng=en&action=view_PUI&id_PUI=816

1.2.3.1 PWRD deployment on Windows systems

Prerequisites:


We will create the following file distribution:

  • File Decompression PWR_Server.zip a C:\PWR\
  • Export Firefox profile to C:\PWR\profile

Using a profile for the checks is not essential, however it is recommended especially when using proxy or when using autocomplete passwords. To create a profile of Firefox follow the steps in the following screenshots:


Ux1.JPG


Ux2.JPG


Choose the destination directory:


Ux3.JPG


We must start Firefox with the new profile to customize options such as proxy, shown popups, etc:


Ux4.JPG


Then we install the service by executing the BAT file service_installer.bat provided and we will start the service:

net start PWRSRV

From this moment you have the Selenium server running on your machine. However, we can run it manually (by previously stopping the service) if we want to carry out debugging tasks, using the following command:

java -jar selenium-server-standalone-2.53.1.jar -firefoxProfileTemplate C:\selenium\firefox_profile -port 4444 -v

1.3 To record a PWR session

Before monitoring a user experience we must record the actions we want the system to perform, in order to browse through our web portal

To do this we have available the "PWR recorder" utility in the module library.

Run the downloaded file to start the recording environment. Once the environment is started, you can access the recorder by clicking on the following button:


Iniciar grabador.png



You should see a window like the one shown in the image:



Ux10.JPG



From this moment we will be able to browse the website that we want to monitor and the different actions of each step that we advance will appear in the recorder.

To stop recording we will use the following button, located at the top right of the recorder:



Ux11.JPG



After completing the actions, we can perform checks on the page, for example verify the existence of a certain text to ensure that the page loaded is correct. To do this we will right click on a section of text in the browser window while we continue to record, and select the option verifyText:


Ux13.JPG


A new step will appear in the recorder indicating the said text checking action:


Ux14.JPG



We can reproduce the entire sequence using the button Play Entire test suite and check that successfully completes:


Ux15.JPG



After verifying the validity of the sequence of navigation, save it (File -> Save Test Case).This will be the file that we will load when creating a new web analysis module in our Pandora console.


1.3.1 Record a transactional session for Pandora WUX

Pandora WUX allows you to split browsing monitoring of a website into multiple modules, representing each of the steps performed.

To insert a new control point and generate the phase modules (up until that point) right-click on the point where you want to identify the start phase.


Pwrd recorder transaction.PNG


We will write the next text as a comment:

phase_start:name_of_phase

The Phase will encompass the time and result of all commands that exist up until the following comment:

phase_end:name_of_phase

All commands that are run between a phase_start y phase_end label will be covered in this phase.


Pwrd recorder transaction2.PNG


1.4 Creating a Web Analytics module in Pandora FMS Console

Once we have our browsing session recorded, it's time to deploy it as a module in Pandora FMS console.

To do so , we will access to any agent associated with a server with WUX feature enabled and we will create a module "Web analysis":

Wux module.PNG



After selecting "create" we must fill in all fields showed in the form:

Wux new module form.PNG
  • Module Name: Module WUX (Father), all sub-modules with monitoring results will be dependent on this new module.
  • Target Web site: For monitoring performance statistics of website.
  • Run performance test: Indicates that we want to monitor not only the browsing experience, but also the performance statistics of access to the target web site.
  • Historical data: Saving or not saving the historical data modules that monitor that user experience.
  • textarea section: in this text box we must copy (or upload) content files of the browsing session we have previously recorded.


1.4.1 Custom Macros

The operation of custom macros involves the substitution of certain text strings that are present in our file of browsing session with certain customizable values.

In the case of web analytics modules, this feature has been improved, allowing dynamic macros which allow these values to be translated into dates and times variables.

Why this feature then?

Let’s suppose that we need to monitor, through a browsing session, the proper functioning of a web application that focus on booking meeting rooms.

If we establish a date and time fixed, the system would probably cancel the reservation because at some point it might stay in the past , for example could be trying to book a room for last week.

We may also find a maximum of time to carry out that reservation, and that the system requires us to book the room within a certain period of time, for example, not exceeding the current month.

To avoid editing the macro every few days, and worrying about the configuration section, you can use the dynamic macros, telling the system to always book the room for the next day when doing the test.


To use this feature, the values must have a specific format, making possible the following substitutions:

@DATE_FORMAT (current date / time with user-defined format)
@DATE_FORMAT_nh (hours)
@DATE_FORMAT_nm (minutes)
@DATE_FORMAT_nd (days)
@DATE_FORMAT_ns (seconds)
@DATE_FORMAT_nM (month)
@DATE_FORMAT_nY (years)


"n" may be an unsigned number (positive) or negative.

And FORMAT follows the standard strftime de perl


Examples:

@DATE_%Y-%m-%d %H:%M:%S
@DATE_%H:%M:%S_300s
@DATE_%H:%M:%S_-1h



1.5 Data viewing

The information generated by WUX is displayed in modules as follows. Enabling view hierarchically in the list of modules, will help us to display the information much more clearly:


WUX modules.PNG



Within this hierarchy we will find the following modules:

  • module_Global_Status: Indicates the global state of complete browsing.
  • module_Global_Time: Indicates the global time lapsed of complete browsing.
  • module_Global_Screenshot: contains an image with the result of browsing error, it will be generated only in case of error
  • module_Phase X: Name of phase_Status: Indicates the status of the browsing in Phase X
  • module_Phase X: Name of phase_Time: Indicates time lapsed in Phase X

Example: Error capture view.


Wux screenshot.png


Template warning.png

Attention: If you upgraded from versions prior to Pandora FMS 7.0NG 712 you must make a small change.

 


In order to store the screenshots generated by WUXServer, you must execute the following operations on your database schema:

alter table tagente_estado modify column datos mediumtext;
alter table tagente_datos_string modify column datos mediumtext;

If you don't execute this actions, your screenshots may be incomplete or cropped

Accessing the WUX section Agent , we can view additional details of the transaction and its phases:


WUX.PNG



In the screenshot above you can see the difference in time of the two phases that our record is divided into as well as access statistics to the front portal.


Website statistics are summarized in the following concepts:

  • Stats_TT: Total time to obtain the website.
  • Stats_TDNS: Total time to resolve the IP address of the target.
  • Stats_TTCP: Time spent on connecting via TCP..
  • Stats_TSSL: Time spent on establishing SSL communication.
  • Stats_TST : Time lapsed until data transfer started.
  • Stats_TTC : Time spent transferring data, It will gather all the transfer time of the resources.
  • Stats_TTR : Time used to transfer the content of the page.
  • Stats_TTR_main: Time lapsed to transfer the HTML code.
  • Stats_TTR_image: Time used to transfer resources of type of image (png|jpg|jpeg|bmp|tiff|gif|webp|svg).
  • Stats_TTR_css: Time spent on transferring style sheets.
  • Stats_TTR_js: Time spent on transferring the JavaScript files.

1.6 Assign alerts to a web analysis module

Alerts associated with Web analysis modules follow the same dynamics of operating as the entire system of alerts in Pandora FMS.

For compatibility, it is recommended to assign templates of alerts on self-generated sub-elements by the analytics web module, such as:

  • The state of the global browisng
  • Alerts on thresholds times
  • Emails warning template set as "always" for screenshots modules of results


1.7 New widgets for Dashboards

To be able to display user browsing information, two new widget types have been added:

Widget for status of browsing phases

Widget wux fases.PNG



Widget for website statistics

Widget wux stats.PNG