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

Docs/specs/ZBXNEXT-1466

From Zabbix.org
Jump to: navigation, search

Support of macros in trigger comment

ZBXNEXT-1466

Status: v1.0

Owner: Alexei, Sasha

Summary

Trigger descriptions should support same set of macros as trigger name.

Specification

Details

  • The following macros should be expanded in trigger comments:
    • {HOST.CONN<1-9>}, {HOST.DNS<1-9>}, {HOST.HOST<1-9>}, {HOST.IP<1-9>}, {HOST.NAME<1-9>}
    • {ITEM.VALUE<1-9>}, {ITEM.LASTVALUE<1-9>}
    • User macros {$MACRO}
  • {TRIGGER.DESCRIPTION} (also deprecated {TRIGGER.COMMENT}) should return text with all supported macros expanded

Front-end changes

  • Monitoring->Triggers
    • If an user has read-only permissions and comment is empty, then non-clickable '-' is displayed in the comments column. If not-empty, then link 'Show' is displayed.
    • If an user has read-write permissions, then it will work without any changes.
  • Monitoring->Triggers->Trigger comment form will be changed
    • The form will display expanded trigger comment as a read-only text
    • If an user has read-write permissions then a new button 'Edit' will be available
    • When pressing the 'Edit' button, the text area becomes editable with not expanded macros. A new button 'Save' will become available and 'Edit' will disappear.
    • All form manipulations must not require full page reload.

Server changes

  • Server will expand macros {TRIGGER.COMMENT} and {TRIGGER.DESCRIPTION} with all included macros

API changes

  • new flag for method trigger.get
    • expandComment
    • if the flag is set, field "comment" will contain expanded macros

Documentation

  • What's new section
  • API documentation
  • Zabbix Manual: supported macros by location

Test cases

  • Check that all macros are expanded properly in the front-end
  • Server should expand {TRIGGER.COMMENT} and {TRIGGER.DESCRIPTION} for notification messages correctly

ChangeLog

  • N/A