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

Docs/specs/ZBXNEXT-1583

From Zabbix.org
Jump to: navigation, search

Support of simple and custom LLD graphs in screens

ZBXNEXT-1583

Status: 1.4

Owner: Alexei

Summary

Zabbix screens should support displaying of graphs created by LLD rules. The graphs should be displayed in a designated screen cell.

Specification

New types (screens_items.resource_type) of screen cells will be introduced:

 SCREEN_RESOURCE_LLD_SIMPLE_GRAPH (19) - display graphs based on item prototype
    resourceid - items.itemid of host item prototype
 SCREEN_RESOURCE_LLD_GRAPH (20) - display graphs based on graph prototype
    resourceid - graphs.graphid of host graph prototype

Other 'screens_items' fields:

 width, height - individual graph width & height
 max_columns - maximum number of columns (1-100)
 x, y, colspan, rowspan, valigh, halign, dynamic - same meaning as for normal graphs, no changes
 elements, style, url, sort_triggers, application - not used

If a graph or a graph prototype is removed then corresponding screen elements will be removed as well (same logic as for normal items).

Front-end changes

Configuration

Screen cell configuration will be modified to contain two additional choices Resource = "Graph prototype" and Resource = "Simple graph prototype".

Simple graph prototype

When "Simple graph prototype" is selected the following configuration parameters will be available:

 Item prototype [<selection popup for item prototype]
 Also: Max columns, Width, Height, H/V aligns, Column/row spawn, Dynamic item

Selecting an item prototype, a preview must be generated in screen cell.

Graph prototype

When "Graph prototype" is selected the following configuration parameters will be available:

 Graph prototype [<selection popup for graph prototype]
 Also: Max columns, Width, Height, H/V aligns, Column/row spawn, Dynamic item

Selecting a graph prototype, a preview must be generated in screen cell.


The 'Max columns' will specify how many columns should be displayed within the screen cell. Width and Height will specify dimension of individual graphs. Graphs will be displayed left-to-right then top-to-bottom natively sorted by graph name.

The functionality will also be supported for templated screens. In this case item and graph prototypes can be selected only from the template.

Monitoring

Simple graph prototype

Having resource type set as "Simple graph prototype", screen cells will display graphs created from LLD generated items sorted by graph name.

In case there are no LLD items generated, nothing is displayed.

In case LLD item is no longer discovered and thus deleted and screen displaying is left on, a standard error message for missing object "No permissions to referred object or it does not exist!" will appear in a place where graph was displayed.

Newly discovered items will only appear in screen cell if page is refreshed.

Graph prototype

Having resource type set as "Graph prototype", screen cells will display graphs created from LLD generated graphs sorted by graph name.

In case there are no LLD graphs generated, nothing is displayed.

In case LLD graph is no longer discovered and thus deleted and screen displaying is left on, a standard error message for missing object "No permissions to referred object or it does not exist!" will appear in a place where graph was displayed.

Newly discovered graphs will only appear in screen cell if page is refreshed.

API changes

screenitem and templatescreenitem

  • A new "max_columns" property will be implemented;
  • New values will be added to the "resourcetype" property: 19 - LLD simple graph; 20 - LLD graph.

graphprototype and itemprototype

  • Deleting an item prototype or a graph prototype, screen items must also be deleted.

graph

  • A new "selectGraphDiscovery" parameter will be implemented for graph.get to return the corresponding graph discovery object for the graph.

Import/export

Import/export functionality will be extended to support new resourceids (SCREEN_RESOURCE_LLD_SIMPLE_GRAPH and SCREEN_RESOURCE_LLD_GRAPH) as well as new table field 'screens_items.max_columns'.

Translation strings

  • Graph prototype
  • Simple graph prototype
  • Max columns

Database changes

New column screens_items.max_columns will be added:

 FIELD           |max_columns        |t_integer      |'3'    |NOT NULL       |0

Documentation

  • What's new in 2.4
  • Zabbix Manual
  • API

ChangeLog

  • 1.1
    • Renamed term "columns" to "max_columns" to be more descriptive about intent.
  • 1.2
    • Changed constant values for SCREEN_RESOURCE_LLD_SIMPLE_GRAPH to 19 and SCREEN_RESOURCE_LLD_GRAPH to 20.
  • 1.3
    • Described changes to the host and graph APIs
  • 1.4
    • Described what should be displayed in configuration and monitoring sections.