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

From Pandora FMS Wiki
Jump to: navigation, search
Line 315: Line 315:
{{Warning|If you don't execute this actions, your screenshots may be incomplete or cropped.}}
{{Warning|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 can view additional details of the transaction and its phases:

Revision as of 08:50, 11 September 2017

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. 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.

1.2 Pandora Web Robot Daemon (PWRD)

Pandora Web Robot Daemon is a service, which provides tools to automate web browser sessions. It's available in our module library. It contains:

  • Firefox 46 Binary for Windows.
  • Firefox customized profile to record and execute web browser sessions.
  • Server for session automation.
  • Web browser recorder (.XPI)

1.2.1 Installation on Linux

Install JAVA for correct operation of pwrd daemon

 yum install java 

Install xorg-x11-server-Xvfb to be able to virtualize graphical environments.

yum install xorg-x11-server-Xvfb

If its not available in your repos, you can find the RPM file in following link:


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
Then, proceed to install PWRD daemon, which can be found in /usr/share/pandora_server/util/pwrd/ when you install Enterprise Pandora FMS server.
unzip PWRD_server.zip
cd PWRD_server/
sudo /bin/bash install_pwrd.sh --install

Once installed, you have 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.
  • 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.
  • 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


/etc/init.d/pwrd start

Get status

/etc/init.d/pwrd status

Stop it

/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


/etc/init.d/pwrd start-hub

Get status

/etc/init.d/pwrd status-hub

Stop it

/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


/etc/init.d/pwrd start-node http://hub:4444/grid/register

Get status

/etc/init.d/pwrd status-node

Stop it

/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.

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.

Configuration example for the pandora_server.conf:

wuxserver 1
wux_port 4444

1.2.2 Installation on Windows

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


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 its use is recommended especially when using proxy or when using autocomplete passwords. To create a profile of Firefox follow the steps in the following screenshots:



Choose the destination directory:


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


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 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:

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 should do the recording. Depending on the type of technology we have chosen, we will use either on recording system or another.

To record a PWR browsing , we will need:

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.


Once downloaded, it will show the icon of the recording environment through Firefox customization options:



Once the access is placed, we will start the recorder:


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:


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:


Aparecerá un nuevo paso en el grabador indicando la acción de comprobación de texto indicada:


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


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.

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.


We will write the next text as a comment:


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


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

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 create a module "Web analysis"":

Wux module.PNG

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

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.

Y FORMAT follows the standard strftime de perl


@DATE_%Y-%m-%d %H:%M:%S

1.5 Viewing the data

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:

  • módulo_Global_Status: Indicates the 'global' state of complete browsing.
  • módulo_Global_Time: Indicates the global time lapsed of complete browsing.
  • módulo_Global_Screenshot: contains an image with the result of browsing error, 'it will be generated only in case of error' '
  • módulo_Phase X: Name of phase_Status: Indicates the status of the browsing in Phase X
  • módulo_Phase X: Name of phase_Time: Indicates time lapsed in Phase X

Template warning.png

Atención: If you upgraded from versions prior to Pandora FMS 712 7.0NG 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;

Template warning.png

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:


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.

Website statistics are summarized in the following:

  • 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