See for the official Zabbix site.


Jump to: navigation, search

Screen element to show last value of one item


Status: Draft

Owner: Alexey Fukalov


Zabbix has screen element 'Plain text' which is used to display item 'N' lastvalues. Though even if it's configured to display only one last value, element layout contains a table, which in situation with only one value is not convenient.


Add new screen element for single item last value display. Element layout should be optimized for displaying one value.


  • element name is 'Single value'
  • element is available in normal and template screens
Element layout
  • element header contains host and item name, separated with a colon (no additional spaces). Only positional macros should be resolved in configuration section, all macros should be resolved in monitoring)
  • if there are triggers in problem state associated with element's item, element background is colored to highest trigger severity. Custom severity colours should be obeyed
  • default background color is white
independent of the colour theme ? --Richlv (talk) 11:55, 16 October 2012 (EEST)
Element configuration

element has these configurable options:

  1. Item: Item selection.
  2. Show text as HTML: checkbox
what should it do ? --Richlv (talk) 11:57, 16 October 2012 (EEST)
  1. Width: number (default value: 200)
  2. Height: number (default value: 350)
this might be a great chance to introduce some more auto-scaling. maybe drop width/height (or offer them as options) and auto-scale this text ? --Richlv (talk) 11:24, 16 October 2012 (SAST)
  1. Horizontal align: Left, Center, Right
  2. Vertical align: Top, Middle, Bottom
  3. Column span: number
  4. Row span: number
  5. Dynamic: checkbox. Available in normal screens only.
Item value displaying
  • if value is numeric, font scales to 50% of element's body height
  • if item value type is text, character or log, default font size is used, text can wrap, and if it does not fit in element, vertical and horizontal scrollbars are shown
  • value is displayed in the center of the element
  • unit conversions are applied to value
  • value mapping is applied to value. format: "<mapped_value> (<original_value>)"
  • if 'Show as HTML' is set, value is not escaped and displayed inside element as HTML.

API changes

  • CScreen, CTemplateScreen and CScreenItem should support new element type.