Kloudfuse Grafana: Deploying Custom Dashboards
Kloudfuse install and upgrade provision a set of standard Grafana dashboards.
To deploy your own custom dashboards to the Kloudfuse-Grafana instance, follow these steps to ensure that the custom dashboards persist through upgrades.
Prerequisites
-
Run a
helm pull --untarcommand for the Kloudfuse release you plan to install or upgrade to. -
Follow the steps in the Installation section.
-
After completing the installation or upgrade, the files are in the
kfusedirectory.
|
The rest of this document uses the sample dashboard |
Configure Kloudfuse to Consume Dashboards
-
Create a
dashboardsdirectory in thekfusedirectory. -
Create a
templatesdirectory in thekfusedirectory. -
Copy the dashboard
*.jsonfiles into thekfuse/dashboardsdirectory. -
For each dashboard you plan to import, create a template file of kind
ConfigMap, in thekfuse/templatesdirectory.See Helm documentation for Templates.
# sock-shop-configmap.yaml apiVersion: v1 kind: ConfigMap metadata: name: sock-shop-dashboard namespace: {{ .Release.Namespace }} data: kloudfuse.json: |- {{ .Files.Get "dashboards/sock-shop.json" | indent 4 }}yaml -
Update your
custom-values.yamlfile with custom dashboards as dashboard providers. Add them under thegrafanasection.For example, this is how you would include the
sock-shop.jsondashboard in thecustom-values.yamlfile:# custom_values.yaml # grafana - Configuration for the embedded Grafana included in Kfuse grafana: grafana: fullnameOverride: "kfuse-grafana" nameOverride: "kfuse-grafana" # replicas - Specify the number of Grafana replicas to deploy replicas: 1 dashboardProviders: dashboardproviders.yaml: apiVersion: 1 providers: - name: 'sock-shop' (1) orgId: 1 folder: <folderName> (2) type: file disableDeletion: true editable: false options: path: /var/lib/grafana/dashboards/sock-shop (3) dashboardsConfigMaps: sock-shop: sock-shop-dashboardyaml1 providers.namemust match the dashboard*.json2 providers.folderis optional. By default, Grafana installs all dashboards in thegeneralfolder.3 providers.options.pathmust match the dashboard*.json