Open darnone opened 1 month ago
Is this the link you are looking for? https://grafana.com/grafana/dashboards/16829-kubernetes-tanzu-velero/
The link I am looking for would end in .json
If you open this in the browser it would download a .json https://grafana.com/api/dashboards/16829/revisions/latest/download
I am aware of how to download the json. Perhaps I am asking the wrong question When we deploy the kube-prometheus-stack, grafana is configured to install the Kubernetes dashboards automatically. It looks like the following. At the bottom, you can see how I am pulling in the dashboards straight from Git. I suppose I could pull a local file, however,
1.) I am new to this 2.) the kube-prometheus-stack is deployed by terraform helm release and we do use any external files
So if the dashboard cannot be pulled this way, I am looking for ideas of how to do this, working around the manual step of installing a json, in the interest of automation.
dashboardProviders:
dashboardproviders.yaml:
apiVersion: 1
providers:
- name: "grafana-dashboards-kubernetes"
orgId: 1
folder: "Kubernetes"
type: file
disableDeletion: true
editable: true
options:
path: /var/lib/grafana/dashboards/grafana-dashboards-kubernetes
- name: "grafana-dashboards-cloudbees"
orgId: 1
folder: "CloudBees"
type: file
disableDeletion: false
editable: true
options:
path: /var/lib/grafana/dashboards/grafana-dashboards-cloudbees
dashboards:
grafana-dashboards-kubernetes:
k8s-views-global:
url: https://raw.githubusercontent.com/dotdc/grafana-dashboards-kubernetes/master/dashboards/k8s-views-global.json
token: ""
k8s-views-namespaces:
url: https://raw.githubusercontent.com/dotdc/grafana-dashboards-kubernetes/master/dashboards/k8s-views-namespaces.json
token: ""
k8s-views-nodes:
url: https://raw.githubusercontent.com/dotdc/grafana-dashboards-kubernetes/master/dashboards/k8s-views-nodes.json
token: ""
k8s-views-pods:
url: https://raw.githubusercontent.com/dotdc/grafana-dashboards-kubernetes/master/dashboards/k8s-views-pods.json
token: ""
grafana-dashboards-cloudbees:
cb-controllers:
url: https://raw.githubusercontent.com/cloudbees/terraform-aws-cloudbees-ci-eks-addon/main/blueprints/02-at-scale/k8s/kube-prom-stack-grafana-db.json
token: ""
Can you not replace json url with this /download link?
Here's curl result, without even needing to use -L to follow redirects.
curl https://grafana.com/api/dashboards/16829/revisions/latest/download
{
"annotations": {
"list": [
...
Here's an example following your syntax I found on github. I assume it should work for you too. https://github.com/mhumeSF/nix-media/blob/ec4cfe7053926e80617290705034e61551e892f0/cluster/apps/monitoring/grafana/app/helmrelease.yaml#L191
The link need not end in .json
What steps did you take and what happened: This is not really an issue - more like a question. Trying to import dashboard 16829 using grafana dashboardProvider but I don't have a url path to the dashboard json. I that available?
What did you expect to happen: Just looking for the dashboard json path. Something like