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

Details

    • Team B
    • 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

    Description

      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.

      Attachments

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

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: