See for the official Zabbix site.


Jump to: navigation, search

Referencing item values in graph titles


Status: v1.2

Owner: Alexei & Sasha


Currently there is no way to show item values in graph titles. Common use case - referencing ifAlias in the title.


Referencing item values in graph titles will be possible using standard macro syntax:






Low Level Discovery (LLD)

LLD macros could also be used as a parameter to item key, for example:

 {Cisco switch:ifAlias[{#SNMPINDEX}].last(0)}

This macro will be expanded to, say, {Cisco switch:ifAlias[Port001].last(0)} for a real graph created by LLD rule.


  • Similarly to map elements, only functions last(), avg(), max() and min() with seconds as arguments will be supported.
  • Graph can contain items from multiple hosts. In this case host of first item can be referenced using {HOST.HOST}, {HOSTNAME}, {HOST.HOST1} or {HOSTNAME1}, second - {HOST.HOST2} or {HOSTNAME2}, etc.
  • Macro will be substituted by string '*UNKNOWN*' in case of (1) incorrect host or item (2) function cannot be evaluated.
  • Value mapping should be resolved
  • Item units should be used

API changes

  • graph.get
    • Additional parameters
      • expandName - flag, expand macros in the graph name;


  • Update macro page
  • Update what's new
  • API graph.get method

Test cases

  • Use macro in a graph on a host
  • Use macro in a templated graph on a template
  • Use macro in a templated graph on a host
  • Use macro in graph prototypes
  • Use incorrectly defined macros
    • Wrong host name
    • Wrong item key
    • {HOST.HOST5} on a graph with 3 items
    • Incorrect function name
    • Correct but unsupported function name


  • v1.1
    • added {HOSTNAME} macro
  • v1.2
    • added API documentation