Grafana Creating a Zabbix Custom template (template)

Source: Internet
Author: User
Tags regular expression sorts time interval grafana

Above the dashboard there is a Settings button, click Settings-"templating

Click New to create a new template

Here's how each parameter works
Variable
Name: variable name, template name, for example, I named group here, then use this variable name to call with $group.
Type: variable types, there are various types of variables, where query indicates that the variable is a query statement, type can also be datasource,datasource means that the variable represents a data source, If it is datasource you can use this variable to modify the entire dashboard data source, the variable type can also be a time interval interval and so on. Here we choose Query.
Label: is the name of the corresponding drop-down box, the default is to change the name, select the default.
Hide: There are three values, respectively, empty, label,variable. Select label to indicate that the name of the drop-down box is not displayed. Select variable to hide the variable, which is not displayed above dashboard. The default selection is empty, and the default is also selected here.

Query Options
Data source: Not much to say.
Refresh: When to update the value of the variable, the value of the variable is obtained by querying the data source, but the data source itself will change, so to update the value of the variable from time to time, so that changes in the data source will be displayed in the variable corresponding drop-down box. Refresh has three values to choose from, never: Never update. On Dashboard load: Updated when Dashboard is loaded. On time Range change: This hasn't figured out how to use it. Here, select on Dashboard Load, and when the data source is updated, refresh the current Dashboard, and the value of the variable will be updated accordingly.
Queries: query expressions, different data source query expressions are different (these can go to the official Web query), here because is to query Zabbix groups information, so the expression is *.
Regex: A regular expression used to filter the crawled data, which is not filtered by default.
Sort: Sorts, sorts the values of the variables in the drop-down box, sorts them a lot, the default is disable, which indicates how the query results are displayed in the dropdown box. Choose Disable here.

Selection Options
Multi-value: Enable this function, the value of the variable can be selected more than one, in the variable corresponding to the drop-down box can choose a combination of multiple values.
Include All option: This feature is enabled, and the Variable drop-down box has one more options.
Custom All value: The Include all option feature is enabled before the custom All Value entry box appears, indicating that the option to all is a custom value, all this option defaults to a combination of all values, you can also customize, For example, I customize all for CPU five minute average load, then select all to represent CPU five minute average load.
Although the selection of the combination of values can be in a panel to view a variety of monitoring data, but because the different monitoring data format may not be the same, in a graphic format is difficult to compatible, so there is a problem, so it is recommended by default is not selected.

Value groups/tags
Combination of labels, you can select multiple values to set a label together, this function has not been understood, in accordance with the official online operation has no effect, ignore it, anyway, not much impact.

Preview of values (shows Max)
After the front is set up, the top 20 is shown below, because my groups has only one Zabbix agents, so only one is shown.

Click Add,group This template is created.
Create another three template (Host,application,item) in this way. The other three created and group are the same except Name,query.

Variable host
name:host  query: $group. *
Variable application
name:application     query: $group. $host. *
Variable item
name:item    Query: $group. $host. $application. *

After the creation of a red box in the four can be, note that the order, is a first-level, the order can be adjusted on the right.

Use the above template to create a panel (portal)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.