mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Provisioning: datasources auto deletion (#83034)
This commit is contained in:
@@ -81,6 +81,14 @@ If the data source already exists, Grafana reconfigures it to match the provisio
|
||||
The configuration file can also list data sources to automatically delete, called `deleteDatasources`.
|
||||
Grafana deletes the data sources listed in `deleteDatasources` _before_ adding or updating those in the `datasources` list.
|
||||
|
||||
You can configure Grafana to automatically delete provisioned data sources when they're removed from the provisioning file.
|
||||
To do so, add `prune: true` to the root of your provisioning file.
|
||||
With this configuration, Grafana also removes the provisioned data sources if you remove the provisioning file entirely.
|
||||
|
||||
{{% admonition type="note" %}}
|
||||
The `prune` parameter is available in Grafana v11.1 and higher.
|
||||
{{% /admonition %}}
|
||||
|
||||
### Running multiple Grafana instances
|
||||
|
||||
If you run multiple instances of Grafana, add a version number to each data source in the configuration and increase it when you update the configuration.
|
||||
@@ -100,6 +108,10 @@ deleteDatasources:
|
||||
- name: Graphite
|
||||
orgId: 1
|
||||
|
||||
# Mark provisioned data sources for deletion if they are no longer in a provisioning file.
|
||||
# It takes no effect if data sources are already listed in the deleteDatasources section.
|
||||
prune: true
|
||||
|
||||
# List of data sources to insert/update depending on what's
|
||||
# available in the database.
|
||||
datasources:
|
||||
|
||||
Reference in New Issue
Block a user