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

    • Sprint 47, Dec 2018
    • 0.25

      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

       

            asitals Andrejs Sitals (Inactive)
            wiper Andris Zeila
            Team A
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: