See www.zabbix.com for the official Zabbix site.

Docs/specs/ZBXNEXT-1089

From Zabbix.org
Jump to: navigation, search

Support of user macros in GUI scripts

ZBXNEXT-1089

Status: v1.0

Owner: Alexei, Sasha

Summary

Commands used in GUI scrips should support user macros.

Specification

Details

  • 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

Documentation

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

ChangeLog

  • N/A