Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docs website update #1763

Merged
merged 8 commits into from
Jan 10, 2024
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
* Link the PR to the related issue
* If there's no issue for the PR, please, create it first
* Rebase your PR if it gets out of sync with master
* Rebase your PR if it gets out of sync with main
* Ensure your PR does not include dist/ directory

**REMOVE THE TEXT ABOVE BEFORE CREATING THE PULL REQUEST**
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Change Log

## [4.4.5] - 2023-12-20

- ⚙️ **Docs**: Documentation website moved from [github pages](https://grafana.github.io/grafana-zabbix) to [grafana.com/docs/plugins](https://grafana.com/docs/plugins/alexanderzobnin-zabbix-app/latest/) page

## [4.4.4] - 2023-11-21

### Feature
Expand Down Expand Up @@ -661,7 +665,7 @@ option description for more information.
### Changed

- Template query format. New format is `{group}{host}{app}{item}`. It allows to use names with dot. Updated
[templating docs](https://alexanderzobnin.github.io/grafana-zabbix/guides/templating/#query-format),
[templating docs](https://grafana.com/docs/plugins/alexanderzobnin-zabbix-app/latest/templating#query-format),
[#254](https://github.com/alexanderzobnin/grafana-zabbix/issues/254)
- Update included dashboards. Add templated zabbix datasource and use it for all metrics.
- Improved performance of groupBy() functions (at 6-10x faster than old).
Expand Down
28 changes: 14 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
# Zabbix plugin for Grafana

[![Version](https://badge.fury.io/gh/grafana%2Fgrafana-zabbix.svg)](https://github.com/grafana/grafana-zabbix/releases)
[![Change Log](https://img.shields.io/badge/change-log-blue.svg?style=flat)](https://github.com/grafana/grafana-zabbix/blob/master/CHANGELOG.md)
[![Docs](https://img.shields.io/badge/docs-latest-red.svg?style=flat)](https://grafana.github.io/grafana-zabbix)
[![Change Log](https://img.shields.io/badge/change-log-blue.svg?style=flat)](https://github.com/grafana/grafana-zabbix/blob/main/CHANGELOG.md)
[![Docs](https://img.shields.io/badge/docs-latest-red.svg?style=flat)](https://grafana.com/docs/plugins/alexanderzobnin-zabbix-app/latest/)

![Dashboard](https://user-images.githubusercontent.com/4932851/53799185-e1cdc700-3f4a-11e9-9cb4-8330f501b32e.png)

## Features

- Select multiple metrics [by using Regex](https://grafana.github.io/grafana-zabbix/guides/gettingstarted/#multiple-items-on-one-graph)
- Create interactive and reusable dashboards with [template variables](https://grafana.github.io/grafana-zabbix/guides/templating/)
- Select multiple metrics [by using Regex](https://grafana.com/docs/plugins/alexanderzobnin-zabbix-app/latest/gettingstarted/#multiple-items-on-one-graph)
- Create interactive and reusable dashboards with [template variables](https://grafana.com/docs/plugins/alexanderzobnin-zabbix-app/latest/templating/)
- Show events on graphs with [Annotations](http://docs.grafana.org/reference/annotations/)
- Display active problems with Triggers panel
- Transform and shape your data with [metric processing functions](https://grafana.github.io/grafana-zabbix/reference/functions/) (Avg, Median, Min, Max, Multiply, Summarize, Time shift, Alias)
- Find problems faster with [Alerting](https://grafana.github.io/grafana-zabbix/reference/alerting/) feature
- Transform and shape your data with [metric processing functions](https://grafana.com/docs/plugins/alexanderzobnin-zabbix-app/latest/functions/) (Avg, Median, Min, Max, Multiply, Summarize, Time shift, Alias)
- Find problems faster with [Alerting](https://grafana.com/docs/plugins/alexanderzobnin-zabbix-app/latest/alerting/) feature
- Mix metrics from multiple data sources in the same dashboard or even graph
- Discover and share [dashboards](https://grafana.com/dashboards) in the official library

Expand All @@ -28,20 +28,20 @@ Install by using `grafana-cli`
grafana-cli plugins install alexanderzobnin-zabbix-app
```

Or see more installation options in [docs](https://grafana.github.io/grafana-zabbix/installation/).
Or see more installation options in [docs](https://grafana.com/docs/plugins/alexanderzobnin-zabbix-app/latest/installation/).

## Getting started

First, [configure](https://grafana.github.io/grafana-zabbix/configuration/) Zabbix data source. Then you can create your first dashboard with step-by-step [Getting started guide](https://grafana.github.io/grafana-zabbix/guides/gettingstarted/).
First, [configure](https://grafana.com/docs/plugins/alexanderzobnin-zabbix-app/latest/configuration/) Zabbix data source. Then you can create your first dashboard with step-by-step [Getting started guide](https://grafana.com/docs/plugins/alexanderzobnin-zabbix-app/latest/gettingstarted/).

## Documentation

- [About](https://grafana.github.io/grafana-zabbix)
- [Installation](https://grafana.github.io/grafana-zabbix/installation)
- [Getting Started](https://grafana.github.io/grafana-zabbix/guides/gettingstarted)
- [Templating](https://grafana.github.io/grafana-zabbix/guides/templating)
- [Alerting](https://grafana.github.io/grafana-zabbix/reference/alerting/)
- [Metric processing functions](https://grafana.github.io/grafana-zabbix/reference/functions/)
- [About](https://grafana.com/docs/plugins/alexanderzobnin-zabbix-app/latest/)
- [Installation](https://grafana.com/docs/plugins/alexanderzobnin-zabbix-app/latest/installation)
- [Getting Started](https://grafana.com/docs/plugins/alexanderzobnin-zabbix-app/latest/gettingstarted)
- [Templating](https://grafana.com/docs/plugins/alexanderzobnin-zabbix-app/latest/templating)
- [Alerting](https://grafana.com/docs/plugins/alexanderzobnin-zabbix-app/latest/alerting/)
- [Metric processing functions](https://grafana.com/docs/plugins/alexanderzobnin-zabbix-app/latest/functions/)

## Community Resources, Feedback, and Support

Expand Down
1 change: 0 additions & 1 deletion cspell.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@
"templating",
"singlestat",
"iowait",
"mkdocs",
"submatch",
"Gleb",
"Ivanovsky",
Expand Down
21 changes: 0 additions & 21 deletions docs/README.md

This file was deleted.

File renamed without changes
42 changes: 0 additions & 42 deletions docs/mkdocs.yml

This file was deleted.

25 changes: 18 additions & 7 deletions docs/src/index.md → docs/sources/_index.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,17 @@
page_title: About Grafana-Zabbix
page_description: Introduction to Grafana-Zabbix plugin.

# About Grafana-Zabbix plugin
---
title: Grafana Zabbix
menuTitle: About Grafana-Zabbix
description: Introduction to Grafana-Zabbix plugin.
aliases:
keywords:
- data source
- zabbix
labels:
products:
- oss
- grafana cloud
weight: 100
---

Grafana-Zabbix is a plugin for Grafana allowing to visualize monitoring data from Zabbix
and create dashboards for analyzing metrics and realtime monitoring. Main goals of this project
Expand All @@ -25,14 +35,15 @@ a number of ways to get help:
Or you can send me [email](mailto:[email protected]).

## Support Project

I develop this project in my free time, but if you really find it helpful and promising, you can
support me. There are some ways to do this. You can [donate](https://www.paypal.me/alexanderzobnin)
any reasonable amount, or you can request a feature development, interesting for you (for example,
support me. There are some ways to do this. You can [donate](https://www.paypal.me/alexanderzobnin)
any reasonable amount, or you can request a feature development, interesting for you (for example,
Triggers panel was sponsored by [Core IT Project](http://coreit.fr/)).

## License

By utilizing this software, you agree to the terms of the included license. Grafana-Zabbix plugin is
licensed under the Apache 2.0 agreement. See
[LICENSE](https://github.com/alexanderzobnin/grafana-zabbix/blob/master/LICENSE) for the full
[LICENSE](https://github.com/alexanderzobnin/grafana-zabbix/blob/min/LICENSE) for the full
license terms.
15 changes: 14 additions & 1 deletion docs/src/reference/alerting.md → docs/sources/alerting.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,17 @@
# Alerting
---
title: Alerting
menuTitle: Alerting
description: Alerting
aliases:
keywords:
- data source
- zabbix
labels:
products:
- oss
- grafana cloud
weight: 520
---

## Alerting overview

Expand Down
42 changes: 26 additions & 16 deletions docs/src/configuration/index.md → docs/sources/configuration.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,32 @@
page_title: Grafana-Zabbix Configuration
page_description: Plugin configuration instructions for Grafana-Zabbix.

# Configuration
---
title: Configuration
menuTitle: Configuration
description: Plugin configuration instructions for Grafana-Zabbix.
aliases:
keywords:
- data source
- zabbix
labels:
products:
- oss
- grafana cloud
weight: 300
---

## Enable plugin

Go to the plugins in Grafana side panel, select _Apps_ tab, then select _Zabbix_, open _Config_
tab and enable plugin.

![Enable Zabbix App](../img/installation-enable_app.png)
![Enable Zabbix App](https://raw.githubusercontent.com/grafana/alexanderzobnin-zabbix-app/main/docs/images/installation-enable_app.png)

## Configure Zabbix data source

After enabling plugin you can add Zabbix data source.

To add new Zabbix data source open _Data Sources_ in side panel, click _Add data source_ and select _Zabbix_ from dropdown list.

![Configure Zabbix data source](../img/installation-datasource_config.png)
![Configure Zabbix data source](https://raw.githubusercontent.com/grafana/alexanderzobnin-zabbix-app/main/docs/images/installation-datasource_config.png)

### HTTP settings

Expand All @@ -29,22 +39,22 @@ To add new Zabbix data source open _Data Sources_ in side panel, click _Add data
### Zabbix API details

- **Username** and **Password**: setup login for access to Zabbix API. Also check user's permissions
in Zabbix if you cannot get any groups and hosts in Grafana.
in Zabbix if you cannot get any groups and hosts in Grafana.
- **Trends**: enable if you use Zabbix 3.x or newer. This option is
strictly recommended for displaying long time periods (more than few days, depending of your item's
updating interval in Zabbix), because few days of item history contains tons of points. Using trends
will increase Grafana performance.
strictly recommended for displaying long time periods (more than few days, depending of your item's
updating interval in Zabbix), because few days of item history contains tons of points. Using trends
will increase Grafana performance.
- **After**: time after which trends will be used.
Best practice is to set this value to your history storage period (7d, 30d, etc). Default is **7d** (7 days).
You can set the time in Grafana format. Valid time specifiers are:
Best practice is to set this value to your history storage period (7d, 30d, etc). Default is **7d** (7 days).
You can set the time in Grafana format. Valid time specifiers are:
- **h** - hours
- **d** - days
- **M** - months
- **Range**: Time range width after which trends will be used instead of history.
It's better to set this value in range of 4 to 7 days to prevent loading large amount of history data.
Default is 4 days.
It's better to set this value in range of 4 to 7 days to prevent loading large amount of history data.
Default is 4 days.
- **Cache TTL**: plugin caches some api requests for increasing performance. Set this
value to desired cache lifetime (this option affect data like items list).
value to desired cache lifetime (this option affect data like items list).
- **Timeout**: Zabbix connection timeout in seconds. Default is 30.

### Direct DB Connection
Expand Down Expand Up @@ -75,7 +85,7 @@ Then click _Add_ - data source will be added and you can check connection using

You can import dashboard examples from _Dashboards_ tab in the data source config.

![Import dashboards](../img/installation-plugin-dashboards.png)
![Import dashboards](https://raw.githubusercontent.com/grafana/alexanderzobnin-zabbix-app/main/docs/images/installation-plugin-dashboards.png)

## Note about Browser Cache

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,17 @@
# Direct DB Connection
---
title: Direct DB Connection
menuTitle: Direct DB Connection
description: Direct DB Connection
aliases:
keywords:
- data source
- zabbix
labels:
products:
- oss
- grafana cloud
weight: 530
---

Since version 4.3 Grafana can use MySQL as a native data source. The idea of Direct DB Connection is that Grafana-Zabbix plugin can use this data source for querying data directly from a Zabbix database.

Expand All @@ -18,13 +31,14 @@ This chart illustrates how the plugin uses both Zabbix API and the MySQL data so
of data from Zabbix. MySQL data source is used only for pulling history and trend data instead of `history.get`
and `trend.get` API calls.

[![Direct DB Connection](../img/reference-direct-db-connection.svg)](../img/reference-direct-db-connection.svg)
[![Direct DB Connection](https://raw.githubusercontent.com/grafana/alexanderzobnin-zabbix-app/main/docs/images/reference-direct-db-connection.svg)](https://raw.githubusercontent.com/grafana/alexanderzobnin-zabbix-app/main/docs/images/reference-direct-db-connection.svg)

## Query structure

Below is an example query for getting history in the Grafana-Zabbix Plugin:

**MySQL**:

```sql
SELECT itemid AS metric, clock AS time_sec, {aggFunc}(value) as value
FROM {historyTable}
Expand All @@ -35,9 +49,10 @@ ORDER BY time_sec ASC
```

**PostgreSQL**:

```sql
SELECT to_char(itemid, 'FM99999999999999999999') AS metric,
clock / {intervalSec} * {intervalSec} AS time,
SELECT to_char(itemid, 'FM99999999999999999999') AS metric,
clock / {intervalSec} * {intervalSec} AS time,
{aggFunc}(value) AS value
FROM {historyTable}
WHERE itemid IN ({itemids})
Expand All @@ -53,6 +68,7 @@ When getting trends, the plugin additionally queries a particular value column (
depends on `consolidateBy` function value:

**MySQL**:

```sql
SELECT itemid AS metric, clock AS time_sec, {aggFunc}({valueColumn}) as value
FROM {trendsTable}
Expand All @@ -63,9 +79,10 @@ ORDER BY time_sec ASC
```

**PostgreSQL**:

```sql
SELECT to_char(itemid, 'FM99999999999999999999') AS metric,
clock / {intervalSec} * {intervalSec} AS time,
SELECT to_char(itemid, 'FM99999999999999999999') AS metric,
clock / {intervalSec} * {intervalSec} AS time,
{aggFunc}({valueColumn}) AS value
FROM {trendsTable}
WHERE itemid IN ({itemids})
Expand All @@ -79,9 +96,11 @@ ORDER BY time ASC
As you can see, the Grafana-Zabbix plugin uses aggregation by a given time interval. This interval is provided by Grafana and depends on the panel width in pixels. Thus, Grafana displays the data in the proper resolution.

## InfluxDB

Zabbix supports loadable modules which makes possible to write history data into an external database. There's a [module](https://github.com/i-ky/effluence) for InfluxDB written by [Gleb Ivanovsky](https://github.com/i-ky) which can export history into InfluxDB in real-time.

#### InfluxDB retention policy
### InfluxDB retention policy

In order to keep database size under control, you should use InfluxDB retention policy mechanism. It's possible to create retention policy for long-term data and write aggregated data in the same manner as Zabbix does (trends). Then this retention policy can be used in plugin for getting data after a certain period ([Retention Policy](../../configuration/#direct-db-connection) option in data source config). Read more about how to configure retention policy for using with plugin in effluence module [docs](https://github.com/i-ky/effluence#database-sizing).

#### InfluxDB Query
Expand All @@ -98,6 +117,6 @@ GROUP BY time(10s), "itemid" fill(none)

## Functions usage with Direct DB Connection

There's only one function that directly affects the backend data. This function is `consolidateBy`. Other functions work on the client side and transform data that comes from the backend. So you should clearly understand that this is pre-aggregated data (by AVG, MAX, MIN, etc).
There's only one function that directly affects the backend data. This function is `consolidateBy`. Other functions work on the client side and transform data that comes from the backend. So you should clearly understand that this is pre-aggregated data (by AVG, MAX, MIN, etc).

For example, say you want to group values by 1 hour interval and `max` function. If you just apply `groupBy(10m, max)` function, your result will be wrong, because you would transform data aggregated by default `AVG` function. You should use `consolidateBy(max)` coupled with `groupBy(10m, max)` in order to get a precise result.
Loading