docs: add retention policy notes

This commit is contained in:
Alexander Zobnin
2019-02-14 14:05:03 +03:00
parent b6a5aea713
commit 125cbe876c
4 changed files with 18 additions and 2 deletions

View File

@@ -26,7 +26,7 @@ nav:
- 'Upgrade': 'installation/upgrade.md'
- Configuration:
- 'Configuration': 'configuration/index.md'
- 'SQL Data Source Configuration': 'configuration/sql_datasource.md'
- 'Direct DB Connection Configuration': 'configuration/direct_db_datasource.md'
- 'Provisioning': 'configuration/provisioning.md'
- 'Troubleshooting': 'configuration/troubleshooting.md'
- User Guides:

View File

@@ -32,3 +32,10 @@ database name (usually, `zabbix`) and specify credentials.
### Security notes
Make sure you use read-only user for Zabbix database.
## 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](../img/configuration-influxdb_ds_config.png)

View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:216a5d1a495fbd2093446c67e09a5dc669c65f541e65fcc13802facd411b5434
size 111917

View File

@@ -81,7 +81,13 @@ As you can see, the Grafana-Zabbix plugin uses aggregation by a given time inter
## 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 [@i-ky](https://github.com/i-ky) which can export history into InfluxDB in real-time.
InfluxDB Query Example:
#### 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
Eventually, plugin generates InfluxDB query similar to this:
```sql
SELECT MEAN("value")
FROM "history"