setup docs hirearchy

This commit is contained in:
Sriramajeyam Sugumaran
2023-12-20 11:32:04 +00:00
parent a6b91bbd86
commit ef24d1fcb4
14 changed files with 13 additions and 13 deletions

View File

@@ -0,0 +1,95 @@
---
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](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](https://raw.githubusercontent.com/grafana/alexanderzobnin-zabbix-app/main/docs/images/installation-datasource_config.png)
### HTTP settings
- **URL**: set Zabbix API url (full path with `api_jsonrpc.php`).
- **Access**: Set to `Server (default)`.
- **Http Auth**: configure if you use proxy authentication.
- **Basic Auth**:
- **With Credentials**:
### 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.
- **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.
- **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:
- **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.
- **Cache TTL**: plugin caches some api requests for increasing performance. Set this
value to desired cache lifetime (this option affect data like items list).
- **Timeout**: Zabbix connection timeout in seconds. Default is 30.
### Direct DB Connection
Direct DB Connection allows plugin to use existing SQL data source for querying history data directly from Zabbix
database. This way usually faster than pulling data from Zabbix API, especially on the wide time ranges, and reduces
amount of data transferred.
Read [how to configure](./direct_db_datasource) SQL data source in Grafana.
- **Enable**: enable Direct DB Connection.
- **Data Source**: Select Data Source for Zabbix history database.
- **Retention Policy** (InfluxDB only): Specify retention policy name for fetching long-term stored data. Grafana will fetch data from this retention policy if query time range suitable for trends query. Leave it blank if only default retention policy used.
#### Supported databases
**MySQL**, **PostgreSQL**, **InfluxDB** are supported as sources of historical data for the plugin.
### Other
- **Disable acknowledges for read-only users**: disable ability to acknowledge problems from Grafana for non-editors.
- **Disable data alignment**: disable time series data alignment. This feature aligns points based on item update interval. For instance, if value collected once per minute, then timestamp of the each point will be set to the start of corresponding minute. This alignment required for proper work of the stacked graphs. If you don't need stacked graphs and want to get exactly the same timestamps as in Zabbix, then you can disable this feature. Also, data alignment can be toggled for each query individually, in the query options.
Then click _Add_ - data source will be added and you can check connection using _Test Connection_ button. This feature can help to find some mistakes like invalid user name or password, wrong api url.
## Import example dashboards
You can import dashboard examples from _Dashboards_ tab in the data source config.
![Import dashboards](https://raw.githubusercontent.com/grafana/alexanderzobnin-zabbix-app/main/docs/images/installation-plugin-dashboards.png)
## Note about Browser Cache
After updating plugin, clear browser cache and reload application page. See details
for [Chrome](https://support.google.com/chrome/answer/95582),
[Firefox](https://support.mozilla.org/en-US/kb/how-clear-firefox-cache). You need to clear cache
only, not cookies, history and other data.

View File

@@ -0,0 +1,46 @@
---
title: Direct DB Data Source Configuration
menuTitle: Direct DB Data Source Configuration
description: Direct DB Data Source Configuration
aliases:
keywords:
- data source
- zabbix
labels:
products:
- oss
- grafana cloud
weight: 310
---
## Security notes
Grafana-Zabbix plugin can use MySQL, Postgres or InfluxDB (if Zabbix configured to store history data in InfluxDB) data sources to query history and trend data directly from Zabbix database. In order to execute queries, plugin needs only read access to the `history`, `history_uint`, `trends` and `trends_uint` tables. To make connection more secure and prevent unnecessary data disclosure, it's highly recommended to grant read access to only that tables. But if you want to use this data source for querying another data, you can
grant `SELECT` privileges to entire zabbix database. Also, all queries are invoked by grafana server, so you can restrict connection to only grafana host. Here's MySQL example:
```sql
GRANT SELECT ON zabbix.* TO 'grafana'@'grafana-host' identified by 'password';
```
## MySQL
In order to use _Direct DB Connection_ feature you should configure SQL data source first.
![Configure MySQL data source](https://raw.githubusercontent.com/grafana/alexanderzobnin-zabbix-app/main/docs/images/installation-mysql_ds_config.png)
Select _MySQL_ data source type and provide your database host address and port (3306 is default for MySQL). Fill
database name (usually, `zabbix`) and specify credentials.
## PostgreSQL
Select _PostgreSQL_ data source type and provide your database host address and port (5432 is default). Fill
database name (usually, `zabbix`) and specify credentials.
![Configure PostgreSQL data source](https://raw.githubusercontent.com/grafana/alexanderzobnin-zabbix-app/main/docs/images/installation-postgres_ds_config.png)
## InfluxDB
Select _InfluxDB_ data source type and provide your InfluxDB instance host address and port (8086 is default). Fill
database name you configured in the [effluence](https://github.com/i-ky/effluence) module config (usually, `zabbix`) and specify credentials.
![Configure InfluxDB data source](https://raw.githubusercontent.com/grafana/alexanderzobnin-zabbix-app/main/docs/images/configuration-influxdb_ds_config.png)

View File

@@ -0,0 +1,64 @@
---
title: Provisioning Grafana-Zabbix plugin
menuTitle: Provisioning Grafana-Zabbix plugin
description: Grafana-Zabbix plugin provisioning instructions.
aliases:
keywords:
- data source
- zabbix
labels:
products:
- oss
- grafana cloud
weight: 320
---
Its now possible to configure datasources using config files with Grafanas provisioning system. You can read more about how it works and all the settings you can set for datasources on the [provisioning docs page](http://docs.grafana.org/administration/provisioning/#datasources)
### Example Datasource Config File
```yaml
apiVersion: 1
datasources:
- name: Zabbix
type: alexanderzobnin-zabbix-datasource
access: proxy
url: http://localhost/zabbix/api_jsonrpc.php
isDefault: true
jsonData:
# Zabbix API credentials
username: zabbix
password: zabbix
# Trends options
trends: true
trendsFrom: '7d'
trendsRange: '4d'
# Cache update interval
cacheTTL: '1h'
# Alerting options
alerting: true
addThresholds: false
alertingMinSeverity: 3
# Direct DB Connection options
dbConnectionEnable: true
# Name of existing datasource for Direct DB Connection
dbConnectionDatasourceName: MySQL Zabbix
# Retention policy name (InfluxDB only) for fetching long-term stored data.
# Leave it blank if only default retention policy used.
dbConnectionRetentionPolicy: one_year
# Disable acknowledges for read-only users
disableReadOnlyUsersAck: true
# Disable time series data alignment
disableDataAlignment: false
# Use value mapping from Zabbix
useZabbixValueMapping: true
version: 1
editable: false
- name: MySQL Zabbix
type: mysql
url: localhost:3306
database: zabbix
user: grafana
password: password
```

View File

@@ -0,0 +1,19 @@
---
title: Troubleshooting
menuTitle: Troubleshooting
description: Troubleshooting guide for Grafana-Zabbix plugin.
aliases:
keywords:
- data source
- zabbix
labels:
products:
- oss
- grafana cloud
weight: 330
---
See [Grafana troubleshooting](http://docs.grafana.org/installation/troubleshooting/) for general
connection issues. If you have a problem with Zabbix datasource, you should open
a [support issue](https://github.com/alexanderzobnin/grafana-zabbix/issues). Before you do that
please search the existing closed or open issues.