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

"regsub" macro function duplicates forward slashes when output part is put in double quotes

XMLWordPrintable

    • Icon: Problem report Problem report
    • Resolution: Fixed
    • Icon: Major Major
    • 7.0.5rc1, 7.2.0alpha1
    • None
    • Server (S)
    • None
    • S24-W40/41
    • 0.5

      Reported by a customer, that after upgrade to 7.0 their triggers started to not work as expected, because forward slashes were being duplicated in their triggers.

      Comparison between 6.4 and 7.0:
      Trigger prototype is the same on both instances:

      6.4 Trigger and problem:

      7.0 Trigger and problem:

      When double quotes are removed from the output part of regsub macro function in the trigger prototype, everything works as expected.
      Trigger prototype:

      7.0 trigger:

      7.0 problem:

      Omitting output from 6.4 for this because it's the same.

      In our documentation nothing is stated about this change, so from our perspective it's either undocumented behaviour, or a bug.
      For example, our documentation on regsub macro function has some examples, and based on those examples, having quotes around output part of the regsub macro function shouldn't cause issues like this, but work fine:
      https://www.zabbix.com/documentation/7.0/en/manual/config/macros/macro_functions

      Here are templates for 6.4 and 7.0 with this test set up:
      6.4_template.yaml 7.0_template.yaml

        1. 6.4_problem.png
          6.4_problem.png
          40 kB
        2. 6.4_template.yaml
          2 kB
        3. 6.4_trigger.png
          6.4_trigger.png
          26 kB
        4. 7.0_problem_w.png
          7.0_problem_w.png
          29 kB
        5. 7.0_problem.png
          7.0_problem.png
          37 kB
        6. 7.0_template.yaml
          2 kB
        7. 7.0_trigger_w.png
          7.0_trigger_w.png
          25 kB
        8. 7.0_trigger.png
          7.0_trigger.png
          26 kB
        9. image-2024-09-19-09-55-34-707.png
          image-2024-09-19-09-55-34-707.png
          8 kB
        10. trigger_prototype_working.png
          trigger_prototype_working.png
          25 kB
        11. trigger_prototype.png
          trigger_prototype.png
          26 kB
        12. zbx_export_hosts for_duplicate_triggers.yaml
          1 kB

            wiper Andris Zeila
            tbross Tomass Janis Bross
            Team A
            Votes:
            4 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved: