github.com/grafana/pyroscope@v1.18.0/operations/monitoring/helm/pyroscope-monitoring/templates/_dashboards.tpl (about) 1 {{/* 2 Config Map content for dashboard provisioning 3 */}} 4 {{- define "pyroscope-monitoring.dashboards-configmap" -}} 5 {{/* 6 List of dashboards 7 */}} 8 {{- $dashboards := list "operational" "v2-metastore" "v2-read-path" "v2-write-path" }} 9 data: 10 grafana-dashboards.yaml: | 11 apiVersion: 1 12 providers: 13 {{- range $dashboard := $dashboards }} 14 {{- with $ }} 15 - name: "{{ $dashboard }}" 16 type: file 17 allowUiUpdates: true 18 folder: "Pyroscope" 19 options: 20 path: /otel-lgtm/grafana/conf/provisioning/dashboards/{{$dashboard}}.json 21 foldersFromFilesStructure: false 22 {{- end }} 23 {{- end }} 24 {{- range $dashboard := $dashboards }} 25 {{- with $ }} 26 {{$dashboard}}.json: | 27 {{- $content := (include (printf "pyroscope-monitoring.dashboards.%s" $dashboard) . | fromYaml) }} 28 {{- if hasKey $content "Error" }} 29 {{ fail (get $content "Error") }} 30 {{- end }} 31 {{- $content | mustToRawJson | nindent 4 }} 32 {{- end }} 33 {{- end }} 34 {{- end }} 35 36 {{/* 37 Get hash across all dashboards 38 */}} 39 {{- define "pyroscope-monitoring.dashboards-hash" -}} 40 {{- include "pyroscope-monitoring.dashboards-configmap" . | sha256sum }} 41 {{- end }} 42 43 {{/* 44 Ingest selector: This is the selector to be added to get the most outside metrics available. This depends it the cloud-backend-gataway is deployed or not (only in Grafana Cloud) 45 */}} 46 {{- define "pyroscope-monitoring.dashboards-ingest-selector" -}} 47 {{- if .Values.dashboards.cloudBackendGateway }}{{ .Values.dashboards.cloudBackendGatewaySelector }}{{ else }}{{ .Values.dashboards.ingestSelector }}{{ end -}} 48 {{- end }}