Hello,
I was configuring my LS dashboards, and I noticed that a the the bottom of the load menu, there is an advanced button which would allow me to load a json to the dashboards. I was wondering if I could just drop a json file on the backend and have it automatically load all of my custom dashboards? If I can, I need to know how to format the json, where to put the file and what configurations may need to be changed.
Thanks in advance,
K
Loading dashboards from json file
Re: Loading dashboards from json file
If you need to see the JSON format, you can export an existing dashboard and take a look at it that way. It says it is exporting a blob file, but it's JSON. However, I don't think these are actually stored on the file system. It's just generating the JSON from the dashboard configuration.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: Loading dashboards from json file
It seems to work for me. I have the same dashboardProviders section. In addition, I have the following key set:
The value grafana-dashboard is the name of a ConfigMap in the same namespace. The content looks like this:
After deploying, I can see the following on the grafana container:
The content of gain-dashboard.json corresponds to the content loaded into the ConfigMap.
In addition is the the dashboardProviders file in the following location:
Code: Select all
dashboardsConfigMaps:
default: "grafana-dashboard"
Code: Select all
apiVersion: v1
data:
gain-dashboard.json: "cut out for brevity"
kind: ConfigMap
metadata:
creationTimestamp: "2019-04-01T08:14:07Z"
name: grafana-dashboard
namespace: monitoring
resourceVersion: "1039344"
selfLink: /api/v1/namespaces/monitoring/configmaps/grafana-dashboard
uid: 1ec73781-5456-11e9-bfc8-42010a9c00b0
Code: Select all
$ kubectl -n monitoring exec -it grafana-68cddfcf4-kq9s5 ls /var/lib/grafana/dashboards/default
gain-dashboard.json
In addition is the the dashboardProviders file in the following location:
Code: Select all
$ kubectl -n monitoring exec -it grafana-68cddfcf4-kq9s5 ls /etc/grafana/provisioning/dashboards
dashboardproviders.yaml
fontvilla is a fancy text generator that provides you with several cute fonts
- Box293
- Too Basu
- Posts: 5126
- Joined: Sun Feb 07, 2010 10:55 pm
- Location: Deniliquin, Australia
- Contact:
Re: Loading dashboards from json file
Thanks for your follow up information with detailed examples @Smithclr .
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.