Zabbix Documentation 2.0

3.04.04.4 (current)| In development:5.0 (devel)| Unsupported:1.82.02.22.43.23.44.2Guidelines

User Tools

Site Tools


Sidebar

manual:regular_expressions

This is an old revision of the document!


10. Regular expressions

Overview

Complex regular expressions can be created and tested in the Zabbix frontend.

After a regular expression has been created, it can be used in several places in the frontend by referring to its name, prefixed with @, for example, @mycustomregexp.

All regular expressions in Zabbix, whether created with the advanced editor, or entered manually, support POSIX extended regular expressions.

Configuration

To create a regular expression:

  • Go to: Administration → General
  • Select Regular expressions from the dropdown
  • Click on New regular expression

Set the regular expression name. Any Unicode characters are allowed in the name.

A custom regular expression name in Zabbix may contain commas, spaces, etc. In those cases where that may lead to misinterpretation when referencing (for example, a comma in the parameter of an item key) the whole reference may be put in quotes like this: ”@My custom regexp for purpose1, purpose2”.
Regular expression names must not be quoted in other locations (for example, in LLD rule properties).

To add a new subexpression, click on New in the Expressions block.

A custom regular expression may consist of multiple subexpressions, and it can be tested by providing a test string. Results show status of each subexpression and total custom expression status.