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

User macros with context throws preg_match(): Unknown modifier '0'

XMLWordPrintable

    • Icon: Problem report Problem report
    • Resolution: False Positive
    • Icon: Trivial Trivial
    • None
    • 6.2.5
    • Frontend (F)
    • Support backlog

      Steps to reproduce:

      Apply a template such as "Cisco IOS SNMP" to host.
      Configure a user macros with context such as in screenshot

       

      {$IFCONTROL:regex:"^(Gi[1-2]\/0\/(1[3-9]|2[0-9]|3[0-6]))$"} => 0

       

      Similar to ZBX-18209

      Result:

      Each time a trigger where regex is False (ie interface name Gi1/0/12) the error shown in screenshot is triggered in "Problems" and "Dashboard".

      No issue if regex is True (trigger is ignored as expected).

      Expected:

      No error, triggers normally. 

        1. zabbix_error.png
          24 kB
          Julien Lacasse-Roger
        2. zabbix_regex_macro.png
          13 kB
          Julien Lacasse-Roger

            zabbix.dev Zabbix Development Team
            JulioQc Julien Lacasse-Roger
            Team A
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: