Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
en:documentation:03_monitoring:13_user_monitorization [2021/06/09 10:52]
127.0.0.1 external edit
en:documentation:03_monitoring:13_user_monitorization [2021/09/16 09:17] (current)
Line 831: Line 831:
  
 === Value recovery === === Value recovery ===
 +
 Pandora FMS UX is capable of retrieving data directly from the website during the execution of user experience tests. Pandora FMS UX is capable of retrieving data directly from the website during the execution of user experience tests.
  
 To use this new feature, add the screenshot command as a comment in the Selenium test: To use this new feature, add the screenshot command as a comment in the Selenium test:
  
- +{{  :wiki:pwr_recorder_getvalue.png?600  }}
-{{ wiki:PWR_recorder_getValue.png?600 }} +
  
 In the example here, two values are retrieved after navigation and will be represented as modules in Pandora FMS (number and result in text). In the example here, two values are retrieved after navigation and will be represented as modules in Pandora FMS (number and result in text).
  
 The steps to make the plugin collect data are as follows: The steps to make the plugin collect data are as follows:
 +
   * Add a new comment to your test file with the Selenium recorder.   * Add a new comment to your test file with the Selenium recorder.
   * Add the directive to the comment.   * Add the directive to the comment.
Line 847: Line 847:
 Data capture policy Data capture policy
  
-  getValue;module name;module data type;regular expression for data capture+<code> 
 +getValue;module name;module data type;regular expression for data capture 
 + 
 +</code>
  
 What does each field separated by semicolons represent? What does each field separated by semicolons represent?
Line 853: Line 856:
   * **getValue**> Instruction for the UX system.   * **getValue**> Instruction for the UX system.
   * **Module name**> The name of the module as it appears in Pandora FMS.   * **Module name**> The name of the module as it appears in Pandora FMS.
-  * Module data type**> What type will be used. It can be any of the data types supported by Pandora FMS (generic_proc, generic_data, generic_data_string, async_proc, async_data, async_string...) +  * **Module data type****> **What type will be used. It can be any of the [[:en:documentation:02_installation:05_configuration_agents#module_type|data types]] supported by Pandora FMS. 
-  * Perl regular expression to use for data capture**> It must be a Perl regular expression, with the information capture command between brackets. +  * **Perl regular expression to use for data capture**> It must be a Perl regular expression, with the information capture command between brackets.
 For example, in the text: For example, in the text:
- 
 <code> <code>
 +
  <p> The temperature of the solar panel is: <span class="temperature">54º C</span></p>  <p> The temperature of the solar panel is: <span class="temperature">54º C</span></p>
 +
 </code> </code>
- 
  
 If you wish to retrieve the temperature to keep track of the value, specify the regular expression as follows: If you wish to retrieve the temperature to keep track of the value, specify the regular expression as follows:
Line 867: Line 869:
 <code> <code>
 <span class="temperature">(\d+\.*\,*\d*).*</span> <span class="temperature">(\d+\.*\,*\d*).*</span>
 +
 </code> </code>
  
Line 875: Line 878:
 <code> <code>
 getValue;solar panel temperature;generic_data;<span class="temperature">(\d+\.*\,*\d*).*</span> getValue;solar panel temperature;generic_data;<span class="temperature">(\d+\.*\,*\d*).*</span>
 +
 </code> </code>
  
 +The commands that generate modules are:
 +
 +  * **getValue: **Extract a value.
 +<code>
 +getValue;module_name;module_type;REGEX_string_match
 +
 +</code>
 +  * **getVariable**: (Version 753 or later) Extract an specific value from a variable.
 +<code>
 +getVariable;module_name;module_type;var_name
 +
 +</code>
 +  * **getScreenshoot**: capture screen.
 +<code>
 +getScreenshot;module_name
 +
 +</code>
  
-<WRAP center round tip 60%> +<WRAP center round tip 60%> ''getValue''  is a command that belongs to the type that [[:en:documentation:07_technical_annexes:17_compatible_selenium_commands#commands_that_generate_modules|generate PFMS modules]]. Visit the previous link to find out more about them. </WRAP>
-''getValue'' is a command that belongs to the type that [[en:documentation:07_technical_annexes:17_compatible_selenium_commands#Commands_that_generate_modules|generate PFMS modules]]. Visit the previous link to find out more about them. +
-</WRAP>+
  
 +<WRAP center round important 60%> \\ All your own commands must appear in the test file (.side) as comments. Otherwise, it will fail to test the test in the Selenium extension.  \\ </WRAP> 
 ===== Data management and display ===== ===== Data management and display =====