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

Template guidelines suggest to quote item parameters containing macros

    XMLWordPrintable

    Details

    • Team:
      Team INT
    • Sprint:
      Sprint 60 (Jan 2020)

      Description

      From here:

      Always quote all params that contain user or low-level discovery macros.

      Good Bad
      abc["{$MACRO}"]
      abc[{#MACRO}]
      abc["{#MACRO}"]
      abc[{$MACRO}]

      I see no reason to do so, Zabbix will automatically quote parameters if needed when performing macro expansion. In my opinion, additional quotes simply obstruct the view. The situation is even worse when LLD macros are used in user macro context:

      "Good" "Bad"
      abc["{$MACRO:\"{#MACRO}\"}"]
      abc[{$MACRO:"{#MACRO}"}]

        Attachments

          Activity

            People

            Assignee:
            alarionovs Aleksandrs Larionovs (Zabbix Team)
            Reporter:
            cyclone Glebs Ivanovskis
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: