See for the official Zabbix site.


Jump to: navigation, search

Support of user macros in GUI scripts


Status: v1.0

Owner: Alexei, Sasha


Commands used in GUI scrips should support user macros.



  • Zabbix server will expand user macros used in script command
  • Zabbix front-end will expand user macros in confirmation text. The macros will not be expanded when testing confirmation text.
  • Server, front-end: If an user macro does not exist it will stay as it is

API changes

  • script.getscriptsbyhosts
    • The method must return scripts with expanded (all macros including existing {HOST.HOST}, etc) confirmation
    • The method must use mass processing with bulk SQL statements


Test cases

  • User macros defined on template, host and global level should work fine
  • Verify that non-existent user macro will not be replaced by any string
  • Multiple user macros one after another should work
  • Already supported macros (like {HOST.HOST}, {HOST.CONN}, etc) should work as before
  • A combination of normal and user macros also works


  • N/A