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

    • Sprint 60 (Jan 2020)

      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}"}]

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

              Created:
              Updated:
              Resolved: