Pandora: Documentation en: WUX Monitoring
- 1 WEB User experience transactional monitoring (WUX)
- 1.1 Introduction
- 1.2 Pandora Web Robot Daemon (PWRD)
- 1.3 To record a PWR session
- 1.4 Creating a Web Analytics module in Pandora FMS Console
- 1.5 Viewing the data
- 1.6 Assign alerts to a web analysis module
1 WEB User experience transactional monitoring (WUX)
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.
220.127.116.11 PWRD in "Standalone" mode
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).
18.104.22.168 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 registered nodes, giving sessions to each node, depending on their workload.
22.214.171.124 PWRD in "NODE" mode
/etc/init.d/pwrd start-node http://hub:4444/grid/register
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_host 192.168.70.33 wux_port 4444
1.2.2 Installation on Windows
Steps to prepare a working environment for Pandora WUX.
126.96.36.199 PWRD deployment on Windows systems
- Install Java 1.8 on the machine.
- Install Firefox 47.0.1 (download from https://ftp.mozilla.org/pub/firefox/releases/47.0.1/).
- Prepare a Firefox profile that will be used to test automated sessions (optional): http://toolsqa.com/selenium-webdriver/custom-firefox-profile/
- We will create a C:\PWR directory
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:
- 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.
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":
After selecting "create" we must fill in all fields that the form presents:
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 @DATE_%H:%M:%S_300s @DATE_%H:%M:%S_-1h
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:
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
Attention: 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;
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.
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