Grafana + VictoriaLogs
Loki Proxy for VictoriaLogs
Use Grafana's native Loki datasource, Explore, and Logs Drilldown with VictoriaLogs. No plugin required.


Measured against Loki v3.7.10
The latest weekly A/B run, 2026-11-16 at commit 5b5c7965fc: the same data and hardware for both, 39 query-shape sets over 1h to 24h. A row is one query shape over one time range; faster or slower means beyond 25% and 50 ms, and a first request Loki's results cache answered is not judged. The same figures are generated into the README.
| Loki profile | Request | Rows compared | 🟢 Below Loki | 🟡 Close to Loki | 🟠1–2× Loki | 🔴 Above 2× Loki |
|---|---|---|---|---|---|---|
loki-defaults | first | 568 | 365 (64.3%) | 183 (32.2%) | 14 (2.5%) | 6 (1.1%) |
loki-defaults | repeat | 765 | 187 (24.4%) | 568 (74.2%) | 4 (0.5%) | 6 (0.8%) |
aligned | first | 447 | 312 (69.8%) | 120 (26.8%) | 13 (2.9%) | 2 (0.4%) |
aligned | repeat | 529 | 22 (4.2%) | 500 (94.5%) | 2 (0.4%) | 5 (0.9%) |
| Workload (loki-defaults) | Pairs | 🟢 / 🟡 / 🔴 | First request p50 · p90 · slowest: proxy | Loki | Repeat p50: proxy | Loki |
|---|---|---|---|---|---|---|
| Metadata and label browser | 7 | 2 / 2 / 3 | 0.28 · 1.62 · 1.62 s | 0.10 · 0.38 · 0.38 s | 🟢 0.03 s | 0.10 s |
| Drilldown and Explore pages | 118 | 85 / 25 / 8 | 0.12 · 1.06 · 6.73 s | 0.35 · 4.96 · 9.85 s | 🟡 0.03 s | 0.05 s |
| Log queries | 79 | 39 / 39 / 1 | 0.02 · 0.08 · 0.24 s | 0.08 · 0.42 · 1.58 s | 🟢 0.01 s | 0.08 s |
| Metric queries | 366 | 239 / 117 / 10 | 0.10 · 1.04 · 6.52 s | 0.27 · 4.65 · 44.02 s | 🟡 0.02 s | 0.02 s |
First request by the time range a user picks, p50 · p90 · slowest pair:
| Workload | Range | Pairs | 🟢 / 🟡 / 🔴 | Proxy | Loki |
|---|---|---|---|---|---|
| Drilldown and Explore pages | 1h | 40 | 26 / 12 / 2 | 0.04 · 0.11 · 0.43 s | 0.24 · 0.33 · 0.64 s |
| Drilldown and Explore pages | 6h | 36 | 27 / 8 / 1 | 0.16 · 0.76 · 1.09 s | 0.93 · 1.41 · 2.82 s |
| Drilldown and Explore pages | 24h | 40 | 31 / 4 / 5 | 0.50 · 2.46 · 6.73 s | 4.16 · 5.53 · 9.85 s |
| Log queries | 1h | 31 | 4 / 26 / 1 | 0.05 · 0.08 · 0.09 s | 0.07 · 0.11 · 0.15 s |
| Log queries | 3h | 8 | 8 / 0 / 0 | 0.01 · 0.01 · 0.01 s | 0.08 · 0.14 · 0.14 s |
| Log queries | 6h | 20 | 13 / 7 / 0 | 0.01 · 0.04 · 0.08 s | 0.08 · 0.41 · 0.50 s |
| Log queries | 24h | 20 | 14 / 6 / 0 | 0.01 · 0.06 · 0.24 s | 0.11 · 1.50 · 1.58 s |
| Metric queries | 1h | 130 | 69 / 57 / 4 | 0.03 · 0.12 · 0.36 s | 0.13 · 0.30 · 3.98 s |
| Metric queries | 6h | 101 | 78 / 20 / 3 | 0.17 · 0.62 · 1.78 s | 0.66 · 1.60 · 14.84 s |
| Metric queries | 24h | 99 | 83 / 13 / 3 | 0.63 · 2.49 · 6.52 s | 3.35 · 6.55 · 31.26 s |
The heaviest queries for Loki, the ones a user waits for:
| Query shape | Range | Workload | Proxy | Loki | Proxy vs Loki |
|---|---|---|---|---|---|
F1 sum by over a ratio of two per-stream metrics, 20s step | 24h-20s | Metric queries | 4.14 s | 44.02 s | 🟢 10.6× faster |
B2 sum by over a ratio of two per-stream metrics | 24h | Metric queries | 3.81 s | 31.26 s | 🟢 8.2× faster |
F3 avg by service of rate, 20s step | 24h-20s | Metric queries | 1.82 s | 16.32 s | 🟢 9.0× faster |
B2 sum by over a ratio of two per-stream metrics | 6h | Metric queries | 1.05 s | 14.84 s | 🟢 14.1× faster |
F2 count by service of count_over_time, 20s step | 24h-20s | Metric queries | 0.01 s ‡ | 12.39 s | 🟢 1376.4× faster |
F4 sum of max by service,app, 20s step | 24h-20s | Metric queries | 4.43 s | 12.37 s | 🟢 2.8× faster |
DB1 label breakdown pod | 24h | Drilldown and Explore pages | 1.33 s | 9.85 s | 🟢 7.4× faster |
SF9 volume, logfmt label_format rename | 24h | Metric queries | 3.58 s | 8.38 s | 🟢 2.3× faster |
E3 logfmt latency_ms rate, production | 24h | Metric queries | 1.86 s | 8.27 s | 🟢 4.4× faster |
logfmt volume | 24h | Metric queries | 1.46 s | 8.07 s | 🟢 5.5× faster |
‡ The proxy answered a first request over 6h or more in under 50 ms: probably from its own cache, warmed by an earlier set of the weekly run that sent the same query. The run records Loki's cache counters but not the proxy's, so this row is not a cold proxy.
Where the proxy loses most:
| Query shape | Range | Workload | Proxy | Loki | Proxy vs Loki |
|---|---|---|---|---|---|
DP1 patterns of a plain-text service | 1h | Metadata and label browser | 0.33 s | 0.02 s | 🔴 14.5× slower |
DP2 patterns of an environment | 1h | Metadata and label browser | 1.62 s | 0.27 s | 🔴 6.0× slower |
LF29 logs, drop detected_level | 1h | Log queries | 0.08 s | 0.01 s | 🔴 5.5× slower |
LS8 json count by level_extracted, collision | 1h | Metric queries | 0.14 s | 0.04 s | 🔴 3.4× slower |
LS8 json count by level_extracted, collision | 6h | Metric queries | 0.56 s | 0.17 s | 🔴 3.3× slower |
Readiness by client: the Loki endpoints each client calls, their evidence, and the open differences it shows.
| Client | Loki endpoints it calls | Routed | Compared with Loki in tests | Proven | Open differences it shows |
|---|---|---|---|---|---|
| Grafana Explore | 10 | 10 | 10 | 8 | 64 |
| Logs Drilldown | 11 | 11 | 11 | 9 | 17 |
| Grafana Loki datasource | 6 | 6 | 6 | 4 | 1 |
| Loki API clients | 27 | 25 | 19 | 12 | 21 |
- Answers: 719 of 785 pairs return the same result as Loki, 51 differ and 15 could not be compared.
- Loki read API: 25 of 27 endpoints routed, 19 with tests that compare the proxy against Loki, 12 proven.
- Known differences from Loki: 174 ranked, 149 open; 82 of the open ones are visible in Grafana (64 Explore, 17 Logs Drilldown, 1 Grafana datasource). Each is listed in the ranked differences.
- Every shape and range, the open gaps and the regression gate: performance evidence.
What this project actually solves
Loki-VL-proxy exists for teams that want VictoriaLogs as the backend while preserving Grafana and Loki client workflows that already assume the Loki HTTP API.
Keep Grafana workflows intact
Grafana continues to use the native Loki datasource, Explore, and Logs Drilldown paths. The proxy handles the read-side compatibility and translation work in the middle.
Expose VictoriaLogs safely
VictoriaLogs remains the source of log data while the proxy shapes labels, metadata, patterns, rules, and alerts views into Loki-like contracts where those contracts matter.
Handle dotted OTel fields
The project supports translation profiles for dotted VictoriaLogs fields and Loki-safe underscore labels so operators can keep Grafana usable without giving up native field semantics upstream.
Make the proxy observable
Route-aware metrics and structured logs break out client latency, proxy overhead, upstream slowness, and cache behavior so the translation layer does not become a blind spot.
Practical operator guides
These pages are written as real deployment and migration playbooks, not just keyword landing pages. They map directly onto the docs, chart recipes, cache model, and observability surface the project already ships.
Run Loki-VL-proxy
Start with a local binary or container, prove the Loki-compatible read path, and verify readiness before any Grafana cutover.
Set Up the Grafana Datasource
Keep Grafana on the native Loki datasource and point it at the proxy, then validate translation, labels, metadata, and latency.
Install with Helm
Choose the right chart topology for day one: basic Deployment, StatefulSet with disk cache, or multi-replica peer-cache fleet.
Monitor the Proxy
See downstream, proxy, cache, and upstream behavior with route-aware metrics, logs, and runtime resource signals.
Compare Cost and Performance
See what Loki docs, VictoriaLogs docs, third-party benchmarks, and the proxy cache model actually support about savings.
Migrate from Loki
Use a parallel datasource path, validate Grafana workflows, and cut over only after route-aware checks are green.
Use Cache and Fleet Cache
Understand how Tier0, local cache, disk cache, peer cache, and long-range window reuse reduce repeated backend work.
Search-focused entry points
These pages answer the exact discovery queries operators and Grafana users search for when they are trying to make VictoriaLogs work behind Loki-compatible tooling.
Loki Proxy for VictoriaLogs
The core deployment pattern: put a Loki-compatible read proxy in front of VictoriaLogs so Grafana and Loki API clients stay unchanged.
Grafana Loki Datasource for VictoriaLogs
Exact datasource-level answer for teams searching how to use VictoriaLogs without building a custom Grafana plugin.
Grafana Explore with VictoriaLogs
How query_range, labels, label values, and latency or cache visibility behave when Grafana Explore sits on top of the proxy.
VictoriaLogs with Grafana Loki Datasource
The deployment pattern for keeping Grafana on the Loki datasource while routing reads through Loki-VL-proxy into VictoriaLogs.
Logs Drilldown with VictoriaLogs
Patterns, detected fields, service buckets, and the compatibility contracts that keep Grafana Logs Drilldown usable on VictoriaLogs.
LogQL on VictoriaLogs
Translation modes, dot-versus-underscore semantics, and the limits you need to understand before treating VictoriaLogs as a Loki read backend.
Loki vs VictoriaLogs for Grafana Query Workflows
Operational comparison of a native Loki backend versus VictoriaLogs routed through Loki-VL-proxy for Grafana query paths.
VictoriaLogs vs Loki Cost and Performance
Source-backed comparison of indexing model, high-cardinality posture, operational shape, and the extra savings levers from the proxy.
The path operators actually run
Keep the path simple: clients and Grafana on the left, the compatibility and cache layer in the middle, VictoriaLogs and optional rules backends on the right.
Why operators keep this layer visible
The proxy is not just a protocol adapter. It carries compatibility contracts, latency, and cache behavior that need to be observed as a real production component.
Compatibility is explicit, not implied
The project keeps separate compatibility tracks for Grafana Loki datasource behavior, Logs Drilldown, and VictoriaLogs runtime bands. CI exercises the contracts instead of relying on vague claims.
Translation stays bounded
Route-aware metrics, structured logs, tuple contracts, and label or metadata translation modes are built so operators can see where the proxy adds work and where it passes VictoriaLogs behavior through safely.
Caching is part of the product surface
Tier0 compatibility cache, in-memory cache, disk cache, and optional peer or fleet cache are first-class operational levers, not hidden implementation details.
Observability follows the runtime path
The packaged dashboard follows Client -> Proxy -> VictoriaLogs and breaks out route, latency, errors, cache efficiency, and operational resources for both Prometheus pull and OTLP push setups.
Start from the practical guides, then drop into the deep docs
The landing pages should get you to the right operating model fast. The deep docs still cover exact flags, compatibility matrices, benchmarks, scaling decisions, and runbooks.