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

Function backslashes escaped when applying template from autoregistration actions

XMLWordPrintable

    • Sprint 90 (Jul 2022), Sprint 91 (Aug 2022), Sprint 92 (Sep 2022), Sprint 93 (Oct 2022), Sprint 94 (Nov 2022)
    • 0.25

      Steps to reproduce:

      1. Create template with some trigger having function expression containing backslashes, like:
        find(/host/sip.remote[5060],#3,"regexp","^OK\s+")<>0
        
      2. Make this template applied to hosts from autoregistration action (link template when host registers in Zabbix)
      3. Register new host susceptible to autoregistration applying this template

      Result:
      Host trigger expression will be correctly inherited from the template, but backslashes will be escaped, resulting in wrong expression like

      find(/host/sip.remote[5060],#3,"regexp","^OK\\s+")<>0
      

      Expected:
      No such escaping, expressions should be copied as is from templates.

        1. image-2022-05-10-10-12-27-150.png
          36 kB
          Alexey Asemov
        2. image-2022-05-10-10-12-28-774.png
          36 kB
          Alexey Asemov
        3. image-2022-05-10-10-12-49-881.png
          39 kB
          Alexey Asemov
        4. image-2022-05-10-10-14-18-242.png
          13 kB
          Alexey Asemov
        5. image-2022-05-10-10-16-42-331.png
          39 kB
          Alexey Asemov
        6. inconsistency.png
          18 kB
          Konstantins Prutkovs
        7. zabbix-test-fix-doubleescape-funcs.patch
          1 kB
          Alexey Asemov
        8. ZBX-21009.xml
          1 kB
          Edgar Akhmetshin
        9. zbx-21009-template.xml
          4 kB
          Alexey Asemov

            kprutkovs Konstantins Prutkovs (Inactive)
            Alex/AT Alexey Asemov
            Team C
            Votes:
            0 Vote for this issue
            Watchers:
            10 Start watching this issue

              Created:
              Updated:
              Resolved: