-
Notifications
You must be signed in to change notification settings - Fork 51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Manage the default datasource #113
Comments
Yes you can do this. As you noted you can find it in local grafana = import 'grafana/grafana.libsonnet';
{
local basic =
(grafana {
_config+:: {
namespace: 'monitoring-grafana',
grafana+:: {
datasources: [{
name: 'prometheus',
type: 'prometheus',
access: 'proxy',
orgId: 1,
url: 'http://my-prometheus:1234',
version: 1,
editable: false,
}],
},
},
}).grafana,
apiVersion: 'v1',
kind: 'List',
items:
basic.dashboardDefinitions +
[
basic.dashboardSources,
basic.dashboardDatasources,
basic.deployment,
basic.serviceAccount,
basic.service {
spec+: { ports: [
port {
nodePort: 30910,
}
for port in super.ports
] },
},
],
} Does that help? |
It did help! first I am sorry, I didn't give you the full picture. But overall, thanks to your answer, I got the mechanism and I understood the main issue was my knowledge of the jsonnet. Here with what I came up with:
Do you think I need to post it on kube-prometheus for knowledge sharing? |
I think it's absolutely worth adding a documentation page for this in the kube-prometheus project! |
Hi,
Is there a way to interact with the default datasource (the one named prometheus)?
Specifically, I would like to rename it through config/jsonnet.
Or completely disable it and to add it myself in the
_config.grafana+.datasources+
Thank you
The text was updated successfully, but these errors were encountered: