Skip to content
Alexander Zobnin edited this page Jul 27, 2015 · 28 revisions

User’s Guide

Query editor

Grafana-Zabbix plugin provide query editor with standard zabbix host groups, host, applications and items selection and additional host and item filters. This allows to select multiple graphs in one query. Let's look at query editor in detail:

Query editor

Group, Host, Application and Item fields allows to select appropriate zabbix objects from dropdown menu. In the simplest case just select needed item:

Query editor 1

To select multiple items from one query set Items to All:

query_editor_2

Filters

Use item filter to specify regex for items selection:

query_editor_3

Also you can use regex for hosts filtering when All hosts selected.

Variables in filters

Filters support templated variables as a part of regex. Use this feature for extremely flexible filtering!

Select custom variable type and specify values separated by comma.

templated regex

Then use this variable in host or item filter.

templated_regex

Scale

Use Scale field to specify custom multiplier for metric values:

query_editor_4

query_editor_5

Max data points

Grafana-Zabbix plugin uses maxDataPoints parameter to consolidate the real number of values down to this number.

max_data_points_1

max_data_points_2

IT services

Select IT services in menu to switch into IT service editor mode:

2015-07-27 19-17-21 grafana - query editor - google chrome

Templates

Templates allows you to create generic dashboards that can quickly be changed to show stats for a specific group, server, application or item. Look at templates in action:

templated_dashboard

Templated variable editor

templates_editor

Variable values query field needed for specifying zabbix objects request in following format:
Group.Host.Application.Item
Depending on the number of fields, query will return Groups, Hosts, Applications or Items. Examples:

  • * returns all groups
  • *.* returns all hosts (from all groups)
  • Servers.* returns all hosts in group Servers
  • Servers.*.* returns all applications in group Servers
  • Servers.*.*.* returns all items from hosts in group Servers

You can also filter returned result by regex:

Templates_regex

Creating templated dashboard

Open dashboard settings and select Templating

Templated dashboard

Add new variable, for example, group. Specify templated variable query (set * to request all groups). Select All option for adding All entry to list of variable values.

Templated dashboard

Then add variable host. You can use previously added variables in request - this is very powerful feature of Grafana templates. Set query as $group.*. In this case when you change $group variable at dashboard $host will return only hosts belongs to selected group.

Templated dashboard

Templated dashboard

Then add graph to dashboard and select $group and $host as Group and Host accordingly.

Templated dashboard

Change $host or $group and see result!

Templated dashboard

Annotations

Annotations allows to display Zabbix triggers events on graphs:

Annotations

To add annotations open editor and specify Zabbix trigger name (wildcards supported):

annotations_1