Monitoring
Related Guides¶
| Guide | Description |
|---|---|
| Monitoring & Alerting Setup — DigitalOcean & NUC Clusters | Monitoring and alerting setup spanning the DigitalOcean and NUC clusters |
| VictoriaMetrics Scrape Target | Configuring VictoriaMetrics scrape targets |
| VictoriaMetrics Migration | Migration notes for VictoriaMetrics |
| Vector + VictoriaLogs Setup | Vector and VictoriaLogs setup on k3s |
| ClickHouse Production Deployment | ClickHouse production deployment for trace storage |
| OTel to ClickHouse Analytics Bridge | Bridging OpenTelemetry data into ClickHouse for analytics |
| VM Alert Stack Setup | Complete setup of the VictoriaMetrics alerting stack |
Overview¶
This stack provides full observability (traces, logs, metrics) for distributed services using OpenTelemetry, with alerting via Grafana.
Services (OTel SDK)
└─► Vector (OTLP receiver)
├─► VictoriaMetrics ──► Grafana (metrics)
├─► VictoriaLogs ──► Grafana (logs + trace_id)
└─► ClickHouse ──► Grafana (traces)
└─► Alerting → Slack / PagerDuty
Architecture Layers¶
1. PRODUCE — Instrumented Services¶
Services A, B, and C are each instrumented with the OTel SDK:
- Service A — emits traces, logs, and metrics
- Service B — receives the
traceparentheader from Service A - Service C — continues the same
trace_idfrom Service B
The same
trace_idpropagates across all three services via thetraceparentHTTP header (W3C Trace Context standard).
2. COLLECT — Vector¶
Vector acts as the central telemetry pipeline. It receives OTLP (OpenTelemetry Protocol) data from all services and routes it:
| Signal | Destination |
|---|---|
| Metrics | VictoriaMetrics |
| Logs | VictoriaLogs |
| Traces | ClickHouse |
3. STORE — Backends¶
| Backend | Purpose |
|---|---|
| VictoriaMetrics | Metrics storage (RED method: Rate, Errors, Duration) |
| VictoriaLogs | Log storage, indexed with trace_id for correlation |
| ClickHouse | Trace storage + analytics queries |
4. VISUALIZE — Grafana¶
Grafana connects to all three backends and provides:
- RED method dashboards (from VictoriaMetrics)
- Log explorer with
trace_iddrill-down (from VictoriaLogs) - Trace analytics (from ClickHouse)
Tempo (optional) can be added as an alternative waterfall UI for trace visualization.
5. ALERT¶
Grafana drives alerting through:
- Grafana Alerting — rule-based alerts on metrics/logs
- Slack — notification channel
- PagerDuty — on-call escalation
k3s Deployment Notes¶
Workload Types¶
- Deploy stateless components (Vector, Grafana) as Deployments.
- Deploy stateful backends (VictoriaMetrics, VictoriaLogs, ClickHouse) as StatefulSets.
Storage¶
- Use PersistentVolumeClaims for VictoriaMetrics, VictoriaLogs, and ClickHouse data directories.
- The default local-path provisioner in k3s works fine for single-node setups.
- For multi-node clusters, consider Longhorn for replicated storage.
Networking¶
- Services should export OTLP to the Vector service endpoint over:
- HTTP: port
4318 - gRPC: port
4317 - Expose Grafana via an Ingress resource — Traefik is bundled with k3s by default, no additional ingress controller needed.
Configuration¶
- Use a ConfigMap for Vector's pipeline configuration (
vector.toml). - Store credentials (Slack webhook, PagerDuty key) as Secrets.
Recommended Helm Charts¶
| Component | Helm Chart / Operator |
|---|---|
| VictoriaMetrics | victoria-metrics-operator |
| VictoriaLogs | victoria-logs-single |
| ClickHouse | clickhouse-operator |
| Grafana | grafana/grafana |
| Vector | vector/vector |