Ad Widget

Collapse

Zabbix Trigger Tag Regex - doesn't work

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Vaku
    Junior Member
    • Feb 2018
    • 24

    #1

    Zabbix Trigger Tag Regex - doesn't work

    Hi,

    I am trying to implement an event correlation based on official Zabbix documentation:
    https://www.zabbix.com/documentation...lation/trigger
    https://www.zabbix.com/documentation...ger/event_tags

    I have created a Log Collector Item, which reads log file and received latest data for this item is of the following format:

    Code:
    2019.07.22 09:37:29 some.host.com 255316 Problem: Zabbix server unavailable
    Code:
    2019.07.22 09:37:29 some.host.com 255316 Resolved: Zabbix server unavailable
    I have setup a Trigger with the following trigger expression:

    Code:
     {Template App Zabbix Alerts:log[/var/log/alerts/alerts.log].regexp([2-9]{1}[0-9]{3}\.[0-9]{2}\.[0-9]{2} [0-9]{2}\:[0-9]{2}\:[0-9]{2} [a-zA-Z0-9._-]* [0-9]* Problem\: .*)}=1
    This works fine, the problem gets generated once I update log with new record.

    But the same regex doesn't work for Trigger Tags and also doesn't work in Trigger Title.
    Please check attached image:

    Click image for larger version  Name:	RegexNotWorkIssue.png Views:	2 Size:	45.7 KB ID:	382798

    Could anyone help me with this problem?
    It's not clear why the same regex doesn't work for Trigger Tags. Might be a bug of Zabbix or something.


    Attached Files
    Last edited by Vaku; 22-07-2019, 17:11.
  • Vaku
    Junior Member
    • Feb 2018
    • 24

    #2
    Update: works fine. Missed double quotes in regex and "^", "*" tokens.
    Not sure why there are so many different regex syntaxes in Zabbix.
    Logically, this should be the same for Trigger Expression and Trigger Tags

    Comment

    Working...