Grafana Dashboards
There are multiple options how to add dashboard to Grafana.
From chart version 21, this is extended with the option dashboards, which allows automatically loading dashboards from the Grafana marketplace or any other URL that returns a JSON with a Grafana dashboard. Scraping dashboards from configmaps continues to be possible and hasn’t changed.
Adding a dashboard via marketplace
Section titled “Adding a dashboard via marketplace”Add the following part to your .Values:
dashboards: grafana: volsync: enabled: true failOnError: false b64content: false datasource: - name: "${DS_PROMETHEUS}" value: Prometheus - name: "${VAR_REPLICATIONDESTNAME}" value: ".*-dst|.*-bootstrap" marketplace: id: 21356 revision: 3Adding a dashboard via url
Section titled “Adding a dashboard via url”Add the following part to your .Values:
dashboards: grafana: truenas: enabled: true failOnError: false b64content: false datasource: - name: "${DS_MIMIR}" value: Prometheus url: https://raw.githubusercontent.com/Supporterino/truenas-graphite-to-prometheus/refs/heads/main/dashboards/truenas_scale.jsonSome explanation of the values:
Section titled “Some explanation of the values:”enabledturn on/off the dashboardfailOnErrorif enabled any failure during the download, decoding, or provisioning of the dashboard will cause the Grafana deployment to stop and error out, preventing Grafana from deploying.b64contentautomaticly decodes base64 encoded dashboardsdatasource: { name: "", value: "" }defines a list of mappings used to replace specific variables within a dashboard’s JSON file. You must consult the dashboard’s JSON structure to identify which variables need replacement. The variable substitutions must match their exact appearance in the JSON, including any brackets (e.g.,${...}). Be aware that specific deployment environments, such as Flux, might require escaping certain characters.idnumbered id from https://grafana.com/grafana/dashboards/.revisionnumbered revision from https://grafana.com/grafana/dashboards/.urlurl where to download the dashboard from.
Note: It have to be marketplace: or url: both cannot be set at a time per dashboard.