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

From Pandora FMS Wiki
Jump to: navigation, search
(Install on Linux)
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 allow to automate web browser interaction. This create 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. 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 Web Robot Daemon (PWRD) ==
 
== Pandora Web Robot Daemon (PWRD) ==
  
Pandora Web Robot Daemon is a service which provides tools web browser sessions. It's available in our  [https://library.pandorafms.com module library]. It contains:
+
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:
  
 
* Firefox 46 Binary for Windows.
 
* Firefox 46 Binary for Windows.
Line 14: Line 14:
 
* Web browser recorder (.XPI)
 
* Web browser recorder (.XPI)
  
===Install on Linux===
+
===Installation on Linux===
  
Need to install JAVA for correct operation of deamon '''pwrd'''
+
Install JAVA for correct operation of '''pwrd''' daemon
  
 
   yum install java  
 
   yum install java  
  
Install
 
  
Install xorg-x11-server-Xvfb to be able virtualize graphical enviroments.
+
Install xorg-x11-server-Xvfb to be able to virtualize graphical environments.
  
 
  yum install xorg-x11-server-Xvfb
 
  yum install xorg-x11-server-Xvfb
  
If its not available in your repos, you can find RPM file in following link:
+
If its not available in your repos, you can find the RPM file in following link:
  
 
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/6.6/os/x86_64/Packages/xorg-x11-server-Xvfb-1.15.0-22.el6.centos.x86_64.rpm
  
To do the RPM install, just execute in a root console:
+
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 xorg-x11-server-Xvfb-1.15.0-22.el6.centos.x86_64.rpm
  
Proceed to install PWRD daemon, which you can found in ''/usr/share/pandora_server/util/pwrd/'' when you install Enterprise Pandora FMS 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.
  
 
  unzip PWRD_server.zip
 
  unzip PWRD_server.zip
Line 42: Line 41:
 
Once installed, you have several working modes:
 
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.
+
* '''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, its needed to register "nodes" 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 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 be requested to the HUB, which will assign to the node with less load. We can use several nodes to a single hub to escalate the and be able to do more requests in parallel.
+
* '''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 ====
Line 75: Line 74:
  
  
Concentrator mode or HUB will start the daemon as a load balancer. In this working mode, system will balance load between all registered nodes, giving sessions to each node, depending on their usage load.
+
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====
 
====PWRD in "NODE" mode====
Line 88: Line 87:
 
  /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 sessions queued and dispatched from the concentrator, and returning the results of them.
+
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 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.
+
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:
 
Configuration example for the pandora_server.conf:
Line 98: Line 97:
 
  wux_port 4444
 
  wux_port 4444
  
=== Despliegue en Windows ===
+
=== Installation on Windows ===
  
Pasos a seguir para preparar un entorno de trabajo para Pandora WUX.
+
Steps to prepare a working environment for Pandora WUX.
  
  
==== Despliegue de PWRD en sistemas Windows ====
+
==== PWRD deployment on Windows systems ====
  
Prerrequisitos:
+
Prerequisites:
* Instalar Java 1.8 en la máquina que dará el servicio.
+
* Install Java 1.8 on the machine.
* Instalar Firefox 47.0.1 (descargable en 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/).
* Preparar un perfil de Firefox que se utilizará para probar las sesiones automatizadas (opcional): http://toolsqa.com/selenium-webdriver/custom-firefox-profile/
+
* Prepare a Firefox profile that will be used to test automated sessions (optional): http://toolsqa.com/selenium-webdriver/custom-firefox-profile/
* Crearemos el directorio C:\PWR
+
* We will create a  C:\PWR directory
  
  
Haremos la siguiente distribución de ficheros:
+
We will create the following file distribution:
* Descompresión del fichero PWR_Server.zip a C:\PWR\
+
* File Decompression PWR_Server.zip a C:\PWR\
* Exportar el perfil de Firefox a C:\PWR\profile
+
* Export Firefox profile to C:\PWR\profile
  
El uso de un perfil para realizar los chequeos no es obligatorio, no obstante se recomienda su uso sobre todo en caso de utilizar proxy o querer emplear autocompletado de contraseñas.
+
Using a profile for the checks is not essential, however its use is recommended especially when using proxy or when using autocomplete passwords.
Para crear un perfil de Firefox seguiremos los pasos de las siguientes capturas:
+
To create a profile of Firefox follow the steps in the following screenshots:
  
 
<br>
 
<br>
Line 125: Line 124:
 
<br>
 
<br>
  
Elección del directorio destino:
+
Choose the destination directory:
  
 
<br>
 
<br>
Line 131: Line 130:
 
<br>
 
<br>
  
Debemos iniciar Firefox con el nuevo perfil para personalizar opciones como el proxy, mostrado de popups, etc:
+
We must start Firefox with the new profile to customize options such as proxy, shown popups, etc:
  
 
<br>
 
<br>
Line 137: Line 136:
 
<br>
 
<br>
  
A continuación instalaremos el servicio ejecutando el fichero BAT ''service_installer.bat'' proporcionado. E iniciaremos el servicio:
+
Then we install the service by executing the BAT file  ''service_installer.bat'' provided and we will start the service:
  
 
  net start PWRSRV
 
  net start PWRSRV
  
Desde este momento ya tenemos el servidor de Selenium corriendo en nuestra máquina. No obstante podemos ejecutarlo a mano (parando el servicio previamente) en caso de que queramos realizar tareas de ''debugging'', mediante el siguiente comando:
+
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
 
  java -jar selenium-server-standalone-2.53.1.jar -firefoxProfileTemplate C:\selenium\firefox_profile -port 4444 -v
Line 147: Line 146:
  
  
== Grabar una sesión PWR ==
+
== To record a PWR session ==
  
Antes de monitorizar una experiencia de usuario debemos hacer la grabación. Dependiendo del tipo de tecnología que hayamos elegido utilizaremos un sistema de grabación u otro.
+
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.
  
Para realizar la grabación de una navegación con PWR necesitaremos:
+
To record a PWR browsing , we will need:
* Navegador web Firefox versión 47.0.1 (descargable en https://ftp.mozilla.org/pub/firefox/releases/47.0.1/).
+
* Firefox Web browser version 47.0.1 (download from https://ftp.mozilla.org/pub/firefox/releases/47.0.1/).
* Extensión Selenium IDE (descargable en: https://addons.mozilla.org/es/firefox/addon/selenium-ide/).
+
* Selenium IDE ‘’add-on’’ (download from: https://addons.mozilla.org/es/firefox/addon/selenium-ide/).
  
Para instalar correctamente la versión 47.0.1 de Firefox hay que descargarla desde la URL proporcionada anteriormente. En sistemas Windows habrá que añadir el ejecutable al PATH del sistema.
+
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.
  
 
<br>
 
<br>
Line 161: Line 160:
 
<br>
 
<br>
  
Una vez descargado mostraremos el icono del entorno de grabación mediante las opciones de personalización de Firefox:
+
Once downloaded, we will show the icon of the recording environment through Firefox customization options:
  
 
<br>
 
<br>
Line 169: Line 168:
 
<br>
 
<br>
  
Una vez colocado el acceso iniciamos el grabador:
+
Once the access is placed, we will start the recorder:
  
 
<br>
 
<br>
Line 175: Line 174:
 
<br>
 
<br>
  
Desde este momento podremos navegar por el sitio web que queramos monitorizar y las diferentes acciones de cada paso que avancemos irán apareciendo en el grabador.  
+
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.  
  
Para detener la grabación utilizaremos el siguiente botón, situado en la parte superior derecha del grabador:
+
To stop recording, use the following button at the top right of the recorder:
  
 
<br>
 
<br>
Line 183: Line 182:
 
<br>
 
<br>
  
Una vez completadas las acciones, podemos realizar comprobaciones sobre la página, por ejemplo verificar la existencia de un texto determinado para asegurarnos de que la página cargada es la correcta. Para ello haremos click derecho sobre una sección de texto en la ventana del navegador mientras continuamos grabando, y seleccionamos la opción ''verifyText'':
+
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:
  
 
<br>
 
<br>
Line 195: Line 194:
 
<br>
 
<br>
  
Podemos reproducir la secuencia completa mediante el botón ''Play entire test suite'' y comprobar que finaliza correctamente:
+
We can reproduce the entire sequence using the 'button' Play Entire test suite '' and check that successfully completes:
  
 
<br>
 
<br>
Line 201: Line 200:
 
<br>
 
<br>
  
Una vez verificada la validez de la secuencia de navegación, la guardaremos (Archivo -> Save Test Case) para ejecutarla posteriormente con Pandora UX. El fichero resultante será un documento HTML que Pandora UX interpretará.
+
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.
  
=== Grabar una sesión transaccional para Pandora WUX ===
+
=== Record a transactional session for Pandora WUX ===
  
Pandora WUX permite dividir la monitorización de la navegación de un sitio web en múltiples módulos, que representarán cada uno de los pasos realizados.
+
Pandora WUX allows you to split browsing monitoring of a website into multiple modules, representing each of the steps performed.
  
Para insertar un nuevo punto de control y generar los módulos de fase (hasta ese punto) haga clic derecho en el punto donde desea identificar el comienzo de fase.
+
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.
  
 
<br>
 
<br>
Line 213: Line 212:
 
<br>
 
<br>
  
Como comentario pondremos el siguiente texto:
+
We will write the next text as a comment:
  
  phase_start:nombre_de_fase
+
  phase_start:name_of_phase
  
La fase englobará el tiempo y resultado de todos los comandos que se encuentren hasta el siguiente comentario:
+
Phase encompass the time and result of all commands that exist up until the following comment:
  
  phase_end:nombre_de_fase
+
  phase_end:name_of_phase
  
Todos los comandos que se ejecuten entre una etiqueta phase_start y phase_end se englobarán dentro de esa fase.
+
All commands that are run between a phase_start y phase_end label will be covered in this phase.
  
  
== Crear un módulo de análisis web en Pandora FMS Console ==
+
== Creating a Web Analytics module in Pandora FMS Console ==
  
Una vez tenemos nuestra sesión de navegación grabada, es hora de desplegarlo como módulo en la consola de Pandora FMS.
+
Once we have our browsing session recorded, it's time to deploy it as a module in Pandora FMS console.
  
Para ello accederemos a '''cualquier agente asociado a un servidor con la funcionalidad WUX habilitada''' y crearemos un módulo de tipo "Análisis web":
+
To do so , we will access to '' any agent associated with a server with WUX feature enabled '' 'and create a module "Web analysis"":
  
 
[[File:Wux_module.PNG|center|400px]]
 
[[File:Wux_module.PNG|center|400px]]
Line 234: Line 233:
  
  
Una vez seleccionado "crear" deberemos rellenar todos los campos que nos presenta el formulario:
+
After selecting "create" we must fill in all fields that the form presents:
  
 
[[File:Wux_new_module_form.PNG|center|800px]]
 
[[File:Wux_new_module_form.PNG|center|800px]]
  
* Nombre del módulo: Módulo WUX (Padre), todos los sub-módulos con los resultados de la monitorización serán dependientes de este nuevo módulo.
+
Module Name: Module WUX (Father), all sub-modules with monitoring results will be dependent on this new module.
* Sitio web objetivo (target web site): Para la monitorización de estadísticas de rendimiento de sitio web.
+
* Target Web site: For monitoring performance statistics of website.
* Lanzar pruebas de rendimiento (Run performance tests): Indica que queremos monitorizar, no sólo la experiencia de navegación, sino también las estadísticas de rendimiento del acceso al sitio web objetivo.
+
* 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.
* Histórico de datos: Guardar o no la información histórica de los módulos que monitorizan esta experiencia de usuario.
+
* Historical data: Saving or not saving the historical data modules that monitor that user experience.
* Sección ''textarea'': En este cuadro de texto deberemos copiar (o cargar) el contenido de los ficheros de la sesión de navegación que hemos grabado previamente.
+
* '' textarea '' section: in this text box  we must copy (or upload) content files of the browsing session we have previously recorded.
  
  
  
==== Macros personalizadas ====
+
==== Custom Macros ====
  
El funcionamiento de las macros personalizadas implica la substitución de determinadas cadenas de texto presentes en nuestro fichero de sesión de navegación, por ciertos valores personalizables.
+
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.
  
En el caso de módulos de análisis web, se ha mejorado esta funcionalidad, permitiendo '''macros dinámicas''' que permiten que estos valores se traduzcan en '''fechas y horas''' variables.
+
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.
  
¿Por qué esta funcionalidad?
+
Why this feature then?
  
Supongamos que necesitamos monitorizar, mediante una sesión de navegación, el correcto funcionamiento de una aplicación web de reserva de salas de reuniones.
+
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.
  
Si establecieramos una fecha y hora fija, es posible que el sistema cancele la reserva porque en algún momento quede en el pasado, por ejemplo podríamos estar intentando reservar una sala para la semana pasada.
+
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.
  
También es posible que nos encontremos con un máximo de tiempo para poder efecturar esa reserva, y que el sistema nos obligue a reservar la sala dentro de un período de tiempo concreto, por ejemplo, no superior al mes vigente.
+
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.
  
Para evitar tener que editar la macro cada pocos días, y despreocuparnos del apartado de configuración, podemos usar las macros dinámicas, diciendo al sistema que reserve la sala siempre para el día siguiente al momento de realizar el test.
+
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.
  
  
Para poder usar esta funcionalidad, los valores deberán  tener un formato específico, logrando las siguientes sustituciones posibles:
+
To use this feature, the values must have a specific format, making possible the following substitutions:
  
  @DATE_FORMAT (fecha/hora actual con formato definido por el usuario)
+
  @DATE_FORMAT (current date / time with user-defined format)
  @DATE_FORMAT_nh (horas)
+
  @DATE_FORMAT_nh (hours)
  @DATE_FORMAT_nm (minutos)
+
  @DATE_FORMAT_nm (minutes)
  @DATE_FORMAT_nd (días)
+
  @DATE_FORMAT_nd (days)
  @DATE_FORMAT_ns (segundos)
+
  @DATE_FORMAT_ns (seconds)
  @DATE_FORMAT_nM (mes)
+
  @DATE_FORMAT_nM (month)
  @DATE_FORMAT_nY (años)
+
  @DATE_FORMAT_nY (years)
  
  
Donde “n” puede ser un numero sin signo (positivo) o negativo.
+
"n" may be an unsigned number (positive) or negative.
  
Y FORMAT sigue el standard de [http://search.cpan.org/~dexter/POSIX-strftime-GNU-0.02/lib/POSIX/strftime/GNU.pm strftime de perl]
+
Y FORMAT follows the standard [http://search.cpan.org/~dexter/POSIX-strftime-GNU-0.02/lib/POSIX/strftime/GNU.pm strftime de perl]
  
  
Ejemplos:
+
Examples:
  
 
  @DATE_%Y-%m-%d %H:%M:%S
 
  @DATE_%Y-%m-%d %H:%M:%S
Line 288: Line 287:
  
  
== Visualización de los datos ==
+
== Viewing the data ==
  
La información generada por WUX se visualizará en forma de módulos de la siguiente forma. Habilitar la vista en ''modo jerárquico'', en la lista de módulos, nos ayudará a visualizar la información de forma mucho más clara:
+
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:
  
 
<br>
 
<br>
Line 297: Line 296:
  
  
Dentro de esta jerarquía encontraemos los siguientes módulos:
+
Within this hierarchy we will find the following modules:
  
* ''módulo''_Global_Status: Indicará el estado '''global''' de la navegación completa.
+
* ''módulo''_Global_Status: Indicates the  '' 'global' '' state of complete browsing.
* ''módulo''_Global_Time: Indicará el tiempo '''global''' empleado en la navegación completa.
+
* ''módulo''_Global_Time: Indicates the global time lapsed of complete browsing.
* ''módulo''_Global_Screenshot: Contiene una imagen con el resultado del error de navegación, '''solo se generará en caso de error'''
+
* ''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: ''Nombre de fase''_Status: Indicará el estado de la navegación durante la fase X
+
* ''módulo''_Phase X: ''Name of phase''_Status: Indicates the status of the browsing in Phase X
* ''módulo''_Phase X: ''Nombre de fase''_Time: Indicará el tiempo empleado en la fase X
+
* ''módulo''_Phase X: ''Name of phase''_Time: Indicates time lapsed in Phase X
  
  
  
{{warning|Atención: Si ha actualizado desde versiones anteriores a Pandora FMS 7.0NG 712 debe realizar un pequeño cambio.}}
+
{{warning|Atención: If you upgraded from versions prior to Pandora FMS 712 7.0NG you must make a small change.}}
  
Para poder almacenar las capturas de pantalla generadas por WUXServer, deberá lanzar las siguientes operaciones en su esquema de base de datos:
+
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_estado modify column datos mediumtext;
Line 316: Line 315:
 
{{Warning|If you don't execute this actions, your screenshots may me incomplete or cropped.}}
 
{{Warning|If you don't execute this actions, your screenshots may me incomplete or cropped.}}
  
Accediendo a la sección ''WUX'' del agente podemos ver detalles adicionales de la transacción y sus fases:
+
Accessing the 'WUX' section Agent can view additional details of the transaction and its phases:
  
 
<br>
 
<br>
Line 323: Line 322:
  
  
En la captura anterior puede verse la diferencia en tiempos de las dos fases en que se divide nuestra grabación, así como las estadísticas de acceso al portal frontal.
+
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.
  
  
Las estadísticas del sitio web se resumen en los siguientes conceptos:
+
Website statistics are summarized in the following:
  
* '''Stats_TT''': Tiempo total en obtener el sitio web.
+
* '''Stats_TT''': Total time to obtain the website.
* '''Stats_TDNS''': Tiempo total en resolver la dirección IP del objetivo.
+
* '''Stats_TDNS''': Total time to resolve the IP address of the target.
* '''Stats_TTCP''': Tiempo empleado en conectar vía TCP.
+
* '''Stats_TTCP''': Time spent on connecting via TCP..
* '''Stats_TSSL''': Tiempo empleado en establecer comunicación SSL.
+
* '''Stats_TSSL''': Time spent on establishing SSL communication.
* '''Stats_TST''' : Tiempo transcurrido hasta que inició la transferencia de datos.
+
* '''Stats_TST''' : Time lapsed until data transfer started.
* '''Stats_TTC''' : Tiempo transfiriendo datos, agrupará todos los tiempos de transferencia de recursos.
+
* '''Stats_TTC''' : Time spent transferring data, It will gather all the transfer time of the resources.
* '''Stats_TTR''' : Tiempo empleado en transferir el contenido de la página.
+
* '''Stats_TTR''' : Time used to transfer the content of the page.
* '''Stats_TTR_main''': Tiempo empleado en transferir el código HTML.
+
* '''Stats_TTR_main''': Time lapsed to transfer the HTML code.
* '''Stats_TTR_image''':  Tiempo empleado en transferir los recursos de tipo imagen (png|jpg|jpeg|bmp|tiff|gif|webp|svg).
+
* '''Stats_TTR_image''':  Time used to transfer resources of  type of image (png|jpg|jpeg|bmp|tiff|gif|webp|svg).
* '''Stats_TTR_css''': Tiempo empleado en transferir las hojas de estilo.
+
* '''Stats_TTR_css''': Time spent on transferring style sheets.
* '''Stats_TTR_js''': Tiempo empleado en transferir los ficheros JavaScript.
+
* '''Stats_TTR_js''': Time spent on transferring the JavaScript files.
  
== Asignar alertas a un módulo de análisis web ==
+
== Assign alerts to a web analysis module ==
  
Las alertas asociadas a los módulos de análisis Web siguen la misma dinámica de funcionamiento que todo el sistema de alertas en Pandora FMS.  
+
Alerts associated with Web analysis modules follow the same dynamics of operating as the entire system of alerts in Pandora FMS.  
  
Por compatibilidad, se recomienda asignar las plantillas de alertas sobre los sub-elementos autogenerados por el módulo de análisis web, como por ejemplo:
+
For compatibility, it is recommended to assign templates of alerts on self-generated sub-elements by the analytics web module, such as:
  
* El estado de la navegación global
+
* The state of the global browisng
* Alertas sobre umbrales de tiempos
+
* Alerts on thresholds times
* Alertas con plantilla de aviso puesta en "siempre" para los módulos captura de imagen de resultados
+
* Emails warning template set as "always" for screenshots modules of results

Revision as of 13:09, 8 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:

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

1.2.1.1 PWRD in "Standalone" mode

Start

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

1.2.1.2 PWRD in "HUB" mode

Start

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

1.2.1.3 PWRD in "NODE" mode

Start

/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_host 192.168.70.33
wux_port 4444

1.2.2 Installation on Windows

Steps to prepare a working environment for Pandora WUX.


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


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


Ux6.JPG


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


Ux7.JPG


Ux9.JPG


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


Ux10.JPG


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:


Ux11.JPG


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:


Ux13.JPG


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


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


Ux16.JPG


We will write the next text as a comment:

phase_start:name_of_phase

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


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


Examples:

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


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 me incomplete or cropped.

 


Accessing the 'WUX' section Agent 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 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