mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
MySql Datasource: Improve Tooltips and Documentation (#64122)
* Add tooltips to Skip TLS and TLS Auth * Update docs with provisioning examples
This commit is contained in:
@@ -82,7 +82,9 @@ You can use wildcards (`*`) in place of database or table if you want to grant a
|
||||
You can define and configure the data source in YAML files as part of Grafana's provisioning system.
|
||||
For more information about provisioning, and for available configuration options, refer to [Provisioning Grafana]({{< relref "../../administration/provisioning/#data-sources" >}}).
|
||||
|
||||
#### Provisioning example
|
||||
#### Provisioning examples
|
||||
|
||||
##### Basic Provisioning
|
||||
|
||||
```yaml
|
||||
apiVersion: 1
|
||||
@@ -101,6 +103,51 @@ datasources:
|
||||
password: ${GRAFANA_MYSQL_PASSWORD}
|
||||
```
|
||||
|
||||
##### Using TLS Verificaiton
|
||||
|
||||
```yaml
|
||||
apiVersion: 1
|
||||
|
||||
datasources:
|
||||
- name: MySQL
|
||||
type: mysql
|
||||
url: localhost:3306
|
||||
user: grafana
|
||||
jsonData:
|
||||
tlsAuth: true
|
||||
database: grafana
|
||||
maxOpenConns: 0 # Grafana v5.4+
|
||||
maxIdleConns: 2 # Grafana v5.4+
|
||||
connMaxLifetime: 14400 # Grafana v5.4+
|
||||
secureJsonData:
|
||||
password: ${GRAFANA_MYSQL_PASSWORD}
|
||||
tlsClientCert: ${GRAFANA_TLS_CLIENT_CERT}
|
||||
tlsCACert: ${GRAFANA_TLS_CA_CERT}
|
||||
```
|
||||
|
||||
##### Use TLS and Skip Certificate Verification
|
||||
|
||||
```yaml
|
||||
apiVersion: 1
|
||||
|
||||
datasources:
|
||||
- name: MySQL
|
||||
type: mysql
|
||||
url: localhost:3306
|
||||
user: grafana
|
||||
jsonData:
|
||||
tlsAuth: true
|
||||
skipTLSVerify: true
|
||||
database: grafana
|
||||
maxOpenConns: 0 # Grafana v5.4+
|
||||
maxIdleConns: 2 # Grafana v5.4+
|
||||
connMaxLifetime: 14400 # Grafana v5.4+
|
||||
secureJsonData:
|
||||
password: ${GRAFANA_MYSQL_PASSWORD}
|
||||
tlsClientCert: ${GRAFANA_TLS_CLIENT_CERT}
|
||||
tlsCACert: ${GRAFANA_TLS_CA_CERT}
|
||||
```
|
||||
|
||||
## Query builder
|
||||
|
||||
{{< figure src="/static/img/docs/v92/mysql_query_builder.png" class="docs-image--no-shadow" >}}
|
||||
|
||||
Reference in New Issue
Block a user