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

Wrong regular expression preprocessing step output parameter escaping in LLD

    XMLWordPrintable

    Details

    • Team:
      Team A
    • Sprint:
      Sprint 47, Dec 2018
    • Story Points:
      0.25

      Description

      When regular expression preprocessing step is created by LLD the LLD macros in its parameter are resolved with escaped regular expression control characters. However the params field contains two parameters - regular expression and output. Only regular expression must be escaped (the '\' character need to be ecaped in ouput part, but that's it).

      For example create discovery rule with regular expression preprocessing step having parameters

      {#PARAM1}: ([0-9]+) and {#PARAM2}=\1

      Send discovery with

      {
        "data": [
          {
            "{#PARAM1}": "field(x)",
            "{#PARAM2}": "func(\\1)",
          }
        ]
      }

      The output parameter will be escaped to

      func\(\\1\)=\1

      while it should be 

      func(\\1)=\1

       

        Attachments

          Activity

            People

            Assignee:
            asitals Andrejs Sitals
            Reporter:
            wiper Andris Zeila
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: