# list of datasources that should be deleted from the database deleteDatasources: - name: Prometheus orgId: 1
# list of datasources to insert/update depending # what's available in the database datasources: # <string, required> name of the datasource. Required - name: Prometheus # <string, required> datasource type. Required type: prometheus # <string, required> access mode. proxy or direct (Server or Browser in the UI). Required access: proxy # <int> org id. will default to orgId 1 if not specified orgId: 1 # <string> custom UID which can be used to reference this datasource in other parts of the configuration, if not specified will be generated automatically uid: my_unique_uid # <string> url url: http://127.0.0.1:9090 # <string> Deprecated, use secureJsonData.password password: # <string> database user, if used user: # <string> database name, if used database: # <bool> enable/disable basic auth basicAuth: # <string> basic auth username basicAuthUser: # <string> Deprecated, use secureJsonData.basicAuthPassword basicAuthPassword: # <bool> enable/disable with credentials headers withCredentials: # <bool> mark as default datasource. Max one per org isDefault: # <map> fields that will be converted to json and stored in jsonData jsonData: graphiteVersion: '1.1' tlsAuth: false tlsAuthWithCACert: false # <string> json object of data that will be encrypted. secureJsonData: tlsCACert: '...' tlsClientCert: '...' tlsClientKey: '...' # <string> database password, if used password: # <string> basic auth password basicAuthPassword: version: 1 # <bool> allow users to edit datasources from the UI. editable: false
使用后在 Web UI 的数据源页面进行修改会提示 This datasource was added by config and cannot be modified using the UI. Please contact your server admin to update this datasource. 表示数据源的配置,在 Web UI 修改已经不会生效,只有在 datasources.yaml 文件中修改才会生效。
providers: # <string> an unique provider name. Required - name: 'a unique provider name' # <int> Org id. Default to 1 orgId: 1 # <string> name of the dashboard folder. folder: '' # <string> folder UID. will be automatically generated if not specified folderUid: '' # <string> provider type. Default to 'file' type: file # <bool> disable dashboard deletion disableDeletion: false # <bool> enable dashboard editing editable: true # <int> how often Grafana will scan for changed dashboards updateIntervalSeconds: 10 # <bool> allow updating provisioned dashboards from the UI allowUiUpdates: false options: # <string, required> path to dashboard files on disk. Required when using the 'file' type path: /etc/grafana/dashboards-files