Use Data frames response format (#1099)

* Use data frames for numeric data

* Use data frames for text data

* Use data frames for IT services

* fix multiple series

* Convert to the wide format if possible

* Fix table format for text data

* Add refId to the data frames

* Align time series from Zabbix API

* Fill gaps with nulls

* Fix moving average functions

* Option for disabling data alignment

* remove unused logging

* Add labels to data frames

* Detect units

* Set min and max for if percent unit used

* Use value mapping from Zabbix

* Rename unitConverter -> convertZabbixUnit

* More units

* Add missing points in front of each series

* Fix handling table data

* fix db connector data frames handling

* fix it services data frames handling

* Detect all known grafana units

* Chore: remove unused logging

* Fix problems format

* Debug logging: show original units

* Add global option for disabling data alignment

* Add tooltip for the disableDataAlignment feature

* Add note about query options

* Functions for aligning timeseries on the backend
This commit is contained in:
Alexander Zobnin
2020-12-22 15:33:14 +03:00
committed by GitHub
parent ad378a81e1
commit 83618178f0
18 changed files with 700 additions and 91 deletions

View File

@@ -68,12 +68,9 @@ Read [how to configure](./direct_db_datasource) SQL data source in Grafana.
**MySQL**, **PostgreSQL**, **InfluxDB** are supported as sources of historical data for the plugin.
### Alerting
### Other
- **Enable alerting**: enable limited alerting support.
- **Add thresholds**: get thresholds info from zabbix triggers and add it to graphs.
For example, if you have trigger `{Zabbix server:system.cpu.util[,iowait].avg(5m)}>20`, threshold will be set to 20.
- **Min severity**: minimum trigger severity for showing alert info (OK/Problem).
- **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_ - datasource will be added and you can check connection using
_Test Connection_ button. This feature can help to find some mistakes like invalid user name

View File

@@ -30,8 +30,6 @@ datasources:
alerting: true
addThresholds: false
alertingMinSeverity: 3
# Disable acknowledges for read-only users
disableReadOnlyUsersAck: true
# Direct DB Connection options
dbConnectionEnable: true
# Name of existing datasource for Direct DB Connection
@@ -39,6 +37,10 @@ datasources:
# 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
version: 1
editable: false