Streamline your data collection, problem detection and low-level discovery by defining global regular expressions.
Pattern matching within unstructured data is mostly done by using regular expressions. Defining a regular expression can be a lengthy task, that can be simplified by predefining a set of regular expressions which can be quickly referenced down the line.
Simplify pattern matching by defining global regular expressions:
- Reference global regular expressions in log monitoring and snmp trap items
- Simplify pattern matching in trigger functions and calculated items
- Global regular expressions can be referenced in low-level discovery filters
- Combine multiple subexpressions into a single global regular expression
Check out the video to learn how to define and use global regular expressions.
Define and use global regular expressions:
- Navigate to Administration → General → Regular expressions
- Type in your global regular expression name
- Select the regular expression type and provide subexpressions
- Press Add and provide multiple subexpressions
- Navigate to the Test tab and enter the test string
- Click on Test expressions and observe the result
- Press Add to save and add the global regular expression
- Navigate to Configuration → Hosts
- Find the host on which you will test the global regular expression
- Click on either the Items, Triggers or Discovery button to open the corresponding section
- Find your item, trigger or LLD rule and open it
- Insert the global regular expression
- Use the @ symbol to reference a global regular expression by its name
- Update the element to save the changes
Tips and best practices
- Each subexpressions and the total combined result can be tested in Zabbix frontend
- Zabbix uses AND logic if several subexpressions are defined
- Global regular expressions can be referenced by referring to their name, prefixed with the @ symbol
- Zabbix documentation contains the list of locations supporting the usage of global regular expression.
Sign up for the official Zabbix Certified Specialist course and learn how to optimize your data collection, enrich your alerts with useful information, and minimize the amount of noise and false alarms. During the course, you will perform a variety of practical tasks under the guidance of a Zabbix certified trainer, where you will get the chance to discuss how the current use cases apply to your own unique infrastructure.