3937b4f366
Deploys the whole stack into the observability namespace of the local cluster with Kustomize alone — no helm install, no dashboard created by hand in the UI. The Makefile carries every command: deploy, dashboards, diagnostics, PVC flush, teardown. Dashboards are files, never UI objects. Each carries a stable uid, which is what keeps URLs, cross-links and alerts alive across redeployments, and references datasources by stable uid rather than by name. The dashboard ConfigMap is generated without a name-suffix hash so applying it updates it in place and Grafana reloads without a restart, while the provisioning ConfigMaps keep their hash precisely so that a change there does force one. Prometheus scrapes the kubelet /metrics/resource endpoint rather than /metrics/cadvisor: on this cluster cadvisor exposes machine_* series only and no container_* at all, which would leave every CPU and memory panel empty. Alloy ships every pod's logs to Loki through the Kubernetes API, so no /var/log mount is needed. Tempo's metrics_generator feeds span metrics and the service graph back into Prometheus, and the datasources are wired so a log line's trace_id opens the matching trace. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
83 lines
1.9 KiB
YAML
83 lines
1.9 KiB
YAML
# Declarative datasource provisioning.
|
|
# The `uid` values are STABLE and are what dashboard JSON files reference:
|
|
# "datasource": { "type": "prometheus", "uid": "prometheus" }
|
|
apiVersion: 1
|
|
|
|
deleteDatasources:
|
|
- name: Prometheus
|
|
orgId: 1
|
|
- name: Loki
|
|
orgId: 1
|
|
- name: Tempo
|
|
orgId: 1
|
|
|
|
datasources:
|
|
- name: Prometheus
|
|
uid: prometheus
|
|
type: prometheus
|
|
access: proxy
|
|
orgId: 1
|
|
url: http://prometheus:9090
|
|
isDefault: true
|
|
editable: false
|
|
jsonData:
|
|
httpMethod: POST
|
|
timeInterval: 30s
|
|
manageAlerts: false
|
|
exemplarTraceIdDestinations:
|
|
- name: trace_id
|
|
datasourceUid: tempo
|
|
|
|
- name: Loki
|
|
uid: loki
|
|
type: loki
|
|
access: proxy
|
|
orgId: 1
|
|
url: http://loki:3100
|
|
editable: false
|
|
jsonData:
|
|
timeout: 60
|
|
maxLines: 1000
|
|
# Logs -> traces: a trace_id in the log line opens Tempo.
|
|
derivedFields:
|
|
- name: TraceID
|
|
matcherType: regex
|
|
matcherRegex: '"?trace[_-]?id"?[:=]"?([a-f0-9]{16,32})'
|
|
url: '$${__value.raw}'
|
|
datasourceUid: tempo
|
|
urlDisplayLabel: View trace
|
|
|
|
- name: Tempo
|
|
uid: tempo
|
|
type: tempo
|
|
access: proxy
|
|
orgId: 1
|
|
url: http://tempo:3200
|
|
editable: false
|
|
jsonData:
|
|
httpMethod: GET
|
|
streamingEnabled:
|
|
search: true
|
|
metrics: true
|
|
# Service graph fed by the metrics_generator -> Prometheus.
|
|
serviceMap:
|
|
datasourceUid: prometheus
|
|
nodeGraph:
|
|
enabled: true
|
|
tracesToLogsV2:
|
|
datasourceUid: loki
|
|
spanStartTimeShift: -5m
|
|
spanEndTimeShift: 5m
|
|
filterByTraceID: true
|
|
filterBySpanID: false
|
|
tags:
|
|
- key: service.name
|
|
value: app
|
|
tracesToMetrics:
|
|
datasourceUid: prometheus
|
|
spanStartTimeShift: -5m
|
|
spanEndTimeShift: 5m
|
|
tags:
|
|
- key: service.name
|
|
value: service
|