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

Docs/specs/ZBXNEXT-1663

From Zabbix.org
Jump to: navigation, search

New notification macros {TRIGGER.NAME.ORIG}, {ITEM.NAME.ORIG} and {ITEM.KEY.ORIG}

ZBXNEXT-1663

Status: Draft

Owner: -

Version: 2.0 and 2.2

Summary

Notification macros {TRIGGER.NAME.ORIG}, {ITEM.NAME.ORIG} and {ITEM.KEY.ORIG} should return original (unexpanded) trigger name, item name and item key respectively.

Specification

{ITEM.NAME.ORIG} and {ITEM.KEY.ORIG} will support Nth position in a trigger expression.

Details

When merging to 2.2 the check for event source should be added. In case of event source is item only {ITEM.NAME.ORIG} and {ITEM.KEY.ORIG} are supported.

Example

Given the following trigger:

  • Trigger name: {HOST.NAME} activity detected
  • Trigger expression: {host:item1[{HOST.NAME}].last(0)}>0 | {host:item2[{HOST.NAME}].last(0)}>0
  • First item name: Activity of item1 on $1
  • Second item name: Activity of item2 on $1

the results should be

  • {TRIGGER.NAME.ORIG} expands to "{HOST.NAME} activity detected"
  • {ITEM.NAME.ORIG} expands to "Activity of item1 on $1"
  • {ITEM.NAME.ORIG2} expands to "Activity of item2 on $1"
  • {ITEM.KEY.ORIG1} expands to "item1[{HOST.NAME}]"
  • {ITEM.KEY.ORIG2} expands to "item2[{HOST.NAME}]"

Documentation

  • What's new for 2.0.6
  • Macro table

Test cases

None

ChangeLog

  • N/A