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

Docs/specs/ZBXNEXT-384

From Zabbix.org
Jump to: navigation, search

New macros for events

ZBXNEXT-384

Status: 1.2

Owner: Alexei, Sasha

Summary

Zabbix should provide more event related macros in order to simplify integration with third party systems (helpdesk, ticketing, etc).

New and updated macros

Currently Zabbix supports the following event related macros {EVENT.ID}, {EVENT.TIME}, {EVENT.DATE}, {EVENT.AGE}, {EVENT.ACK.HISTORY}, {EVENT.ACK.STATUS}

It will be extended to support new macros and change definitions of existing ones:

  • {EVENT.ID}, {EVENT.STATUS}, {EVENT.VALUE}, {EVENT.TIME}, {EVENT.DATE}, {EVENT.AGE}, {EVENT.ACK.HISTORY}, {EVENT.ACK.STATUS} - it will return ID/status/value/time/date/age/ack history/ack status of event, which generated normal action. In case of Multiple PROBLEM events generation the macros will also return information about original (problem) event.
  • {EVENT.RECOVERY.ID}, {EVENT.RECOVERY.STATUS}, {EVENT.RECOVERY.VALUE}, {EVENT.RECOVERY.TIME}, {EVENT.RECOVERY.DATE} - it will return ID/status/value/time/date of recovery event, i.e. event that stopped escalation of the original action
  • {ACTION.ID}, {ACTION.NAME} - returns action id/name

Complete list of new macros:

  • {ACTION.ID}, {ACTION.NAME}, {EVENT.STATUS}, {EVENT.VALUE}, {EVENT.RECOVERY.ID}, {EVENT.RECOVERY.STATUS}, {EVENT.RECOVERY.VALUE}, {EVENT.RECOVERY.TIME}, {EVENT.RECOVERY.DATE}

These macros will behave differently for recovery messages:

  • {EVENT.ID}, {EVENT.TIME}, {EVENT.DATE}, {EVENT.AGE}, {EVENT.ACK.HISTORY}, {EVENT.ACK.STATUS}

Supported macros by event source

{EVENT.RECOVERY.*}, {EVENT.STATUS} and {EVENT.VALUE} macros will be supported only for event source 'trigger' or 'internal'.

{ACTION.*} will be supported for all event sources.

Server side

  • Zabbix server will support described macros

Interface

Default normal and recovery messages will be updated for trigger actions. Also action 'Report problems to Linux administrators' should be updated to have new default and recovery messages.

 Trigger: {TRIGGER.NAME}
 Age: {EVENT.AGE}
 Trigger status: {TRIGGER.STATUS}
 Trigger severity: {TRIGGER.SEVERITY}
 Trigger URL: {TRIGGER.URL}
 
 Item values:
 
 1. {ITEM.NAME1} ({HOST.NAME1}:{ITEM.KEY1}): {ITEM.VALUE1}
 2. {ITEM.NAME2} ({HOST.NAME2}:{ITEM.KEY2}): {ITEM.VALUE2}
 3. {ITEM.NAME3} ({HOST.NAME3}:{ITEM.KEY3}): {ITEM.VALUE3}
 
 Original event ID: {EVENT.ID}

Documentation

  • What's new
  • New macros must be documented
  • Description of existing macros must be updated
  • Difference in 2.0 vs 2.2 behaviour must be documented for the following macros (in macro page and upgrade notes page):
    • {EVENT.ID}, {EVENT.TIME}, {EVENT.DATE}, {EVENT.AGE}, {EVENT.ACK.HISTORY}, {EVENT.ACK.STATUS}

Test cases

  • Check that all macros work according to the specification

ChangeLog

  • 1.1 changed section "Supported macros by event source". {EVENT.STATUS}, {EVENT.VALUE} and {EVENT.DURATION} macros will be supported only for event source 'trigger' or 'internal'.
  • 1.2 removed {EVENT.DURATION} macro as duplicate of {EVENT.AGE}. In notification messages it would resolve as {EVENT.AGE} macro.