Rename docs folder to prevent broken build

This commit is contained in:
Alexander Zobnin
2023-08-30 16:05:10 +02:00
parent 3335d02749
commit 0156afc734
43 changed files with 0 additions and 0 deletions

View File

@@ -1,55 +0,0 @@
# Getting Started with Grafana-Zabbix
After you [installed and configured](../installation/index.md) Grafana-Zabbix data source let's
create a simple dashboard.
## Simple Graph
Add new Graph panel to dashboard.
Select metrics from dropdown or start to type to filter results
![Metrics filtering](../img/getstarting-metrics_filtering.png)
Let's create _15 min avg processor load_ graph. Select Host Group, Host, Application (optional - you can leave it blank) and Item.
![Processor load](../img/getstarting-processor_load.png)
## Multiple Items On One Graph
You can build graphs with lots of items using Regular Expressions inside metric field. Grafana uses JavaScript regex implementation. For example, if you need to show CPU time (user, system, iowait, etc) you may create graph using this regex in Item field:
```js
/CPU (?!idle).* time/
```
![CPU time](../img/getstarting-regex_cpu_time.png)
Another case to use regex is comparing the same metrics for different hosts. Use `/.*/` regex for showing all metrics or write your own filter. For example, I want to show _CPU system time_ for all hosts which name started with _backend_ from all host groups. I use `/.*/` for Group, `/^backend/` for Host and `CPU system time` for Item.
![Backend system time](../img/getstarting-regex_backend_system_time.png)
## Bar Chart
Let's create a graph which show queries stats for MySQL database. Select Group, Host, Application (_MySQL_ in my case) and Items. I use `/MySQL .* operations/` regex for filtering different types of operations.
![MySQL operations 1](../img/getstarting-mysql_operations_1.png)
To show graph as Bar Chart, go to the **Display** tab, uncheck **Lines** and set **Bars**. Also, enable **Stack** checkbox for showing stacked bars.
![MySQL operations 2](../img/getstarting-mysql_operations_2.png)
But this graph doesn't look good because it contains too many bars. We can fix it by using **Max data points** parameter. Go to the **Metrics** tab and set **Max data points** to 50 for example.
![MySQL operations 3](../img/getstarting-mysql_operations_3.png)
Ok, looks pretty!
## Singlestat and Gauges
Sometimes you may need to show just a big single value for particular metric. Use Grafana's **Singlestat** panel in this case. Let's create panel which shows _CPU user time_ metric.
![Singlestat 1](../img/getstarting-singlestat_1.png)
Suppose that you want to set units as percents and show **Gauge** for this value. Go to the **Options** tab and set units to _percent (0-100)_. Then enable _Show_ option for _Gauge_ and set Min and Max values for your metric (0-100 in our case). Set thresholds if you want to see it on Gauge (`50,80` for example).
![Singlestat 2](../img/getstarting-singlestat_2.png)
Great, looks cool. Read more about Singlestat panel in [Grafana docs](http://docs.grafana.org/reference/singlestat/).
And all together:
![Dashboard](../img/getstarting-dashboard_1.png)

View File

@@ -1,83 +0,0 @@
# Templating Guide
You can use template variables for creating highly reusable and interactive dashboards. General idea of templating is allow Grafana to get different metrics from data source and provide a way to change it on the fly without modifying dashboard. In case of Zabbix it means that you can get list of Host Groups, Hosts, Applications or Items and add it as a variables.
## Creating Variable
To create template variable click the cog icon on the top navigation bar and choose _Templating_.
![Templating menu](../img/templating-menu.png)
When you click _New_ button, you'll see template variable editor. It contains these sections:
![Variable editor](../img/templating-variable_editor.png)
### Variable
**Name**
Name of the variable. You should use this name in queries.
**Label**
Visible label for variable. Use when you want to display different name on dashboard. For instance, _Host Group_ instead *host_group*.
**Type**
By default _Query_ type is selected. It means that Grafana asks data source for values of variable. But there are some other types: _Interval_ (just a time interval), _Data source_ (You can switch data source, for example, if you have more than one Zabbix instance and each added into Grafana as data source), _Custom_ (you can set any predefined values for variable) and _Constant_.
### Query Options
**Data source**
Data source used for querying variable values.
**Refresh**
When to update the values of this variable.
**Query**
Query string.
**Regex**
Use regex if you need to filter values or extract a part of value.
### Selection Options
**Multi-value**
Enable, if you want to select multiple values at the same time.
### Value groups/tags (Experimental feature)
## Query Format
Template variable query in Zabbix data source is a string which contains 4 parts wrapped in braces (`{}`). You still can
use a period (`.`), but it's deprecated and will be removed in future.
```
{host group}{host}{application}{item name}
```
For example,
```
{Zabbix servers}{Zabbix server}{CPU}{*}
{Frontend}{web01.mydomain.com}{*}{*}
```
Each part can be a name of corresponding metric or `*`, which means _all metrics_.
Examples:
- `{*}` returns list of all available Host Groups
- `{*}{*}` all hosts in Zabbix
- `{Network}{*}` returns all hosts in group Network
- `{Linux servers}{*}{*}` returns all applications from hosts in Linux servers group
- `{Linux servers}{backend01}{CPU}{*}` returns all items from backend01 belonging to CPU application.
You can use another variable as a part of query. For instance, you have variable _group_, which returns list of
host groups and want to use it for querying hosts in selected group only. Here's a query for this case:
```
{$group}{*}
```
## Variables Usage
When you create a variable, you can use it as a part of data source query. Grafana also supports variables in different places like panel's and row's titles, Text panel's content, etc.
![Query with variables](../img/templating-query_with_variables.png)
> Note, that you should add `$` sign before variable's name (**$host** for _host_ variable).
See more about templating in [Grafana docs](http://docs.grafana.org/reference/templating)