docs: update docs structure and nav
This commit is contained in:
34
docs/sources/configuration/sql_datasource.md
Normal file
34
docs/sources/configuration/sql_datasource.md
Normal file
@@ -0,0 +1,34 @@
|
||||
# SQL Data Source Configuration
|
||||
|
||||
## MySQL
|
||||
|
||||
In order to use _Direct DB Connection_ feature you should configure SQL data source first.
|
||||
|
||||

|
||||
|
||||
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.
|
||||
|
||||
### Security notes
|
||||
|
||||
As you can see in _User Permission_ note, Grafana doesn't restrict any queries to the database. So you should be careful
|
||||
and create a special user with limited access to Zabbix database. Grafana-Zabbix plugin uses only `SELECT` queries to
|
||||
`history`, `history_uint`, `trends` and `trends_uint` tables. So it's reasonable to grant only SELECT privileges to
|
||||
these tables for grafana user. But if you want to use this MySQL 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.
|
||||
|
||||
```sql
|
||||
GRANT SELECT ON zabbix.* TO 'grafana'@'grafana-host' identified by 'password';
|
||||
```
|
||||
|
||||
## 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.
|
||||
|
||||

|
||||
### Security notes
|
||||
|
||||
Make sure you use read-only user for Zabbix database.
|
||||
Reference in New Issue
Block a user