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 --untar
command 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
kfuse
directory.
The rest of this document uses the sample dashboard |
Configure Kloudfuse to Consume Dashboards
-
Create a
dashboards
directory in thekfuse
directory. -
Create a
templates
directory in thekfuse
directory. -
Copy the dashboard
*.json
files into thekfuse/dashboards
directory. -
For each dashboard you plan to import, create a template file of kind
ConfigMap
, in thekfuse/templates
directory.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 }}
-
Update your
custom-values.yaml
file with custom dashboards as dashboard providers. Add them under thegrafana
section.For example, this is how you would include the
sock-shop.json
dashboard in thecustom-values.yaml
file:# 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-dashboard
1 providers.name
must match the dashboard*.json
2 providers.folder
is optional. By default, Grafana installs all dashboards in thegeneral
folder.3 providers.options.path
must match the dashboard*.json