Kloudfuse Grafana: Deploying Custom Dashboards :: Kloudfuse Docs
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 sock-shop.json. Replace this name in all code snippets with the name of the dashboard you plan to import. |
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 }}
- 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.json dashboard in the custom-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 the general folder. |
| 3 | providers.options.path must match the dashboard *.json |