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:
Kyle Cunningham
2023-03-09 19:50:07 +07:00
committed by GitHub
parent 9f551400c3
commit 09f71a6901
2 changed files with 77 additions and 20 deletions

View File

@@ -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" >}}