Skip to content
Alexander Zobnin edited this page Jun 23, 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

You can also use regex for hosts filtering when All hosts selected.

Scale

Use Scale field to specify custom multiplier for metric values:

query_editor_4

query_editor_5

Templates

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

templates_1

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. Wildcards are supported. 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
Servers.*.*.CPU* returns all items from hosts in group Servers which names start from CPU
*.*.*.CPU* returns all items from all hosts which names start from CPU

See this feature in action:

templates_2

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