Uploaded image for project: 'ZABBIX BUGS AND ISSUES'
  1. ZABBIX BUGS AND ISSUES
  2. ZBX-21848

Not possible to escape parentheses inside RegEx for function 'count'

XMLWordPrintable

    • Icon: Problem report Problem report
    • Resolution: Duplicate
    • Icon: Minor Minor
    • None
    • 6.0.9, 6.2.3
    • Frontend (F)
    • None

      Let's say the value of metric is:

      (0) hello

      If we want to detect this 1:1 using regex, we will use:

      ^\(0\) heelo$
      

      For version 6.0.8 it works fine in trigger function:

      But when upgrading frontend to 6.0.9 and modifying trigger expression a little, it prints:

      Cannot update trigger
      Invalid parameter "/1/expression": incorrect expression starting from "count(/host/input,#2,"eq","^\(0\) hello 123$")=1". 

        1. image-2022-11-01-18-39-28-713.png
          170 kB
          Aigars Kadikis
        2. image-2022-11-01-18-40-29-090.png
          21 kB
          Aigars Kadikis
        3. image-2022-11-01-18-44-22-258.png
          46 kB
          Aigars Kadikis

            zabbix.dev Zabbix Development Team
            aigars.kadikis Aigars Kadikis
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: