diff options
| author | Paul Buetow <paul@buetow.org> | 2025-12-28 20:24:14 +0200 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2025-12-28 20:24:14 +0200 |
| commit | 172e1e6c092e76f4b115c69f7d8fbb94b7bd692b (patch) | |
| tree | 32c5e172140fe98b748655dbe88522fd3952b9b8 | |
| parent | 46ad75840da73098812a883285e7735982aa1fee (diff) | |
Update Grafana Tempo documentation with correct datasource provisioning approach
Updated the blog post to reflect the working datasource provisioning method
that was implemented after extensive debugging.
Changes:
- Replaced old sidecar-based approach (grafana_datasource label) with direct ConfigMap mounting
- Documented unified grafana-datasources-all.yaml containing all four datasources
- Explained direct mount to /etc/grafana/provisioning/datasources/ in persistence-values.yaml
- Noted this approach is simpler and more reliable than sidecar discovery
The old approach with ConfigMap labels did not work due to provisioning module issues.
The new approach follows the pattern from x-rag project and successfully provisions
all datasources (Prometheus, Alertmanager, Loki, Tempo) on Grafana startup.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
| -rw-r--r-- | gemfeed/DRAFT-f3s-kubernetes-with-freebsd-part-X-OBSERVABILITY2.gmi.tpl | 62 |
1 files changed, 43 insertions, 19 deletions
diff --git a/gemfeed/DRAFT-f3s-kubernetes-with-freebsd-part-X-OBSERVABILITY2.gmi.tpl b/gemfeed/DRAFT-f3s-kubernetes-with-freebsd-part-X-OBSERVABILITY2.gmi.tpl index fc5bd8fc..4e2bbb7c 100644 --- a/gemfeed/DRAFT-f3s-kubernetes-with-freebsd-part-X-OBSERVABILITY2.gmi.tpl +++ b/gemfeed/DRAFT-f3s-kubernetes-with-freebsd-part-X-OBSERVABILITY2.gmi.tpl @@ -530,34 +530,58 @@ spec: storage: 10Gi ``` -**datasource-configmap.yaml** - Grafana integration: +**Grafana Datasource Provisioning** + +All Grafana datasources (Prometheus, Alertmanager, Loki, Tempo) are provisioned via a unified ConfigMap that is directly mounted to the Grafana pod. This approach ensures datasources are loaded on startup without requiring sidecar-based discovery. + +In /home/paul/git/conf/f3s/prometheus/grafana-datasources-all.yaml: ``` apiVersion: v1 kind: ConfigMap metadata: - name: tempo-grafana-datasource + name: grafana-datasources-all namespace: monitoring - labels: - grafana_datasource: "1" data: - tempo-datasource.yaml: |- + datasources.yaml: | apiVersion: 1 datasources: - - name: "Tempo" - type: tempo - uid: tempo - url: http://tempo.monitoring.svc.cluster.local:3200 - jsonData: - tracesToLogsV2: - datasourceUid: 'loki' - tracesToMetrics: - datasourceUid: 'prometheus' - serviceMap: - datasourceUid: 'prometheus' -``` - -The ConfigMap label grafana_datasource: "1" enables automatic discovery by the Grafana sidecar, just like the Prometheus datasource configuration. + - name: Prometheus + type: prometheus + uid: prometheus + url: http://prometheus-kube-prometheus-prometheus.monitoring:9090/ + access: proxy + isDefault: true + - name: Alertmanager + type: alertmanager + uid: alertmanager + url: http://prometheus-kube-prometheus-alertmanager.monitoring:9093/ + - name: Loki + type: loki + uid: loki + url: http://loki.monitoring.svc.cluster.local:3100 + - name: Tempo + type: tempo + uid: tempo + url: http://tempo.monitoring.svc.cluster.local:3200 + jsonData: + tracesToLogsV2: + datasourceUid: loki + spanStartTimeShift: -1h + spanEndTimeShift: 1h + tracesToMetrics: + datasourceUid: prometheus + serviceMap: + datasourceUid: prometheus + nodeGraph: + enabled: true +``` + +The kube-prometheus-stack Helm values (persistence-values.yaml) are configured to: +* Disable sidecar-based datasource provisioning +* Mount grafana-datasources-all ConfigMap directly to /etc/grafana/provisioning/datasources/ + +This direct mounting approach is simpler and more reliable than sidecar-based discovery. #### Installation |
