See for the official Zabbix site.


Jump to: navigation, search

Content retrieval based on regular expressions for Web monitoring


Status: v1.3

Owner: Alexei


It is often required to use retrieved HTML content for consecutive steps. The functionality could be used for session IDs, for example.


Web monitoring steps will accept new parameter, list of variables to extract. Each variable is represented by variable name and a regular expression. The variable could be used in consecutive steps same way as scenario-level variables.

Allowed syntax:


In case of 'regex:' prefix Zabbix will try to match this regular expression with returned HTML content (without headers) and keep the value in variable {authID}. Maximum value length will be limited to 255 characters and will be cut if it contains more characters.

Web step will fail if regex pattern contains no capture groups or there is no match.

Step-level variables will overwrite scenario-level ones. 'regex:' style variable defined on scenario level will be used for each step.

Posix extended regular expressions with multiline matching will be used. First sub-expression will be captured and returned.

Server and proxy

  • httptest.macros should be renamed to httptest.variables everywhere in C code


Web step scenario form will contain new field 'Variable' located after 'Post', same size as 'Post'.

  • No default value
  • Same validation rules as for scenario-level Variables

Web scenario form should be updated to use httptest.variables instead of httptest.macros.

API changes

  • httptest.create and httptest.update methods will be extended to support new text field 'variables' in scenario step properties.
  • changes related to renaming of httptest.macros to httptest.variables

Database changes

Database patch must be created:

  • Existing field 'httptest.macros' will be renamed to 'httptest.variables'
  • New field for table 'httpstep'
 FIELD           |variables         |t_shorttext         |""     |NOT NULL       |ZBX_SYNC,ZBX_PROXY


  • What's new
  • Zabbix Manual
  • Database structure


  • N/A