Open shay-berman opened 3 years ago
anyone?
also opened in kube-prometheus-stack https://github.com/prometheus-community/helm-charts/issues/443
@shay-berman is this helpful: https://github.com/grafana/helm-charts/blob/main/charts/grafana/README.md#sidecar-for-datasources ?
Adding this to your datasource definition could fix you problem:
# list of datasources that should be deleted from the database
deleteDatasources:
- name: Prometheus
orgId: 1
Forget what I mentioned above. I think you want this:
@GMartinez-Sisti Looking for the same information and I found this issue. Unfortunately, it looks like your link to the values.yaml file includes a line number instead of a permalink. That line in the values file doesn't appear relevant to this discussion. Would you mind sharing a permalink to the content you had in mind as the solution to this issue? Or share an example of how to rename the default "Prometheus" datasource?
@Ghazgkull you are right. My bad, sorry!
I don’t remember the entire context, but at that date this was the state of the file and it makes sense:
For anyone coming here: As part of provisioning the datasource, you can specify a unique ID rather than have Grafana generate one automatically by using the uid field. Hardcoding this ensures any panels referencing this data source will continue to work. Unfortunately we run in to another problem where the sidecar detects duplicate uid's and fails. There you have to use the "deleteDatasources" to have the sidecar delete and recreate the data sources as unfortunately the sidecar has no overwriting facility.
- name: Some JSON datasource
uid: b2aa4114-c29c-4402-bb7f-2b4b4f251184
type: marcusolsson-json-datasource
url: https://localhost
I tried to change the datasource name in my configmap and then reload grafana (using kube-prometheus-stack helm) but then it just added another datasource with the new name.
Is it posible to rename datasource in grafana via the configmap?
but if I kubectl edit this configmap and change the name from prometheus1 -> prometheusX, it will not actually rename the datasource on grafana, it will add another one.
is it posible to rename grafana datasource in k8s? (reminder when using datasource as configmap its not posible to edit the datasource from the Grafana UI)