我们如何在 Grafana 中配置 Microsoft SQL Server 数据源。有 YML 文件样本吗?
我的 YML 文件如下所示:
apiVersion: 1
datasources:
- name: Microsoft SQL Server
# <string, required> datasource type. Required
type: Microsoft SQL Server
# <string, required> access mode. direct or proxy. Required
access: proxy
# <int> org id. will default to orgId 1 if not specified
orgId: 1
# <string> url
#url: http://prometheus:9090/prometheus
# <string> database password, if used
password: 123
# <string> database user, if used
user: sa
# <string> database name, if used
database: jzcim4
host: 192.168.1.77
# <bool> enable/disable basic auth
basicAuth: false
# <string> basic auth username, if used
basicAuthUser:
# <string> basic auth password, if used
basicAuthPassword:
# <bool> enable/disable with credentials headers
withCredentials:
# <bool> mark as default datasource. Max one per org
isDefault: true
但是当我重新启动 grafana 时,我收到此“未知插件”错误:
如下所示,目前正在运行。
apiVersion: 1
datasources:
- name: Microsoft SQL Server
type: mssql
url: 192.168.64.5:1433
database: xxx
user: sa
jsonData:
maxOpenConns: 0 # Grafana v5.4+
maxIdleConns: 2 # Grafana v5.4+
connMaxLifetime: 14400 # Grafana v5.4+
secureJsonData:
password: 'Xxad123312312'