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

Problems view show error messages when using new macro regex

XMLWordPrintable

    • Sprint 67 (Aug 2020), Sprint 68 (Sep 2020), Sprint 69 (Oct 2020), Sprint 70 (Nov 2020), Sprint 71 (Dec 2020), Sprint 72 (Jan 2021), Sprint 73 (Feb 2021)
    • 0.25

      Steps to reproduce:

      Using template "Template Module Linux filesystems by Zabbix agent active".

      Add a new macro to the template to get a "problem" for /usr/product.* filesystems

      {$VFS.FS.INODE.PFREE.MIN.CRIT:regex:"^/usr/product($|/.*$)"}} => 0
      

      If you have a /usr/product* FS you should have a trigger.

      Go to a problem view

      Result:

      preg_match(): Unknown modifier 'r' [jsrpc.php:88 → CScreenProblem->get() → CScreenProblem::makeData() → CMacrosResolverHelper::resolveTriggerDescription() → CMacrosResolverHelper::resolveTriggerDescriptions() → CMacrosResolver->resolveTriggerDescriptions() → CMacrosResolverGeneral->getUserMacros() → CMacrosResolverGeneral->getHostUserMacros() → CMacrosResolverGeneral->getHostUserMacros() → preg_match() in include/classes/macros/CMacrosResolverGeneral.php:1217]
      

      Expected:
      Line 1217 and other places where macros are evaluated should handle the new regex macros.

      If I remove this macro, the problem page is fine.

        1. Trigger.jpg
          Trigger.jpg
          62 kB
        2. problems.jpg
          problems.jpg
          526 kB
        3. Macro.jpg
          Macro.jpg
          120 kB

            talbergs Mārtiņš Tālbergs (Inactive)
            GuiGuiGui GuiGuiGui
            Team B
            Votes:
            1 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved: