Skip to main content

Grafana + VictoriaLogs

Loki Proxy for VictoriaLogs

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

Native Loki datasource
Grafana keeps the built-in Loki datasource type
No plugin or UI fork.
Explore + Drilldown
Compatibility is tested against the user-facing Grafana flows
Datasource, Explore, Drilldown, patterns.
Read-only by design
Query, metadata, patterns, and rules or alerts read views are in scope
Push remains blocked.
Operator-first telemetry
Metrics and logs expose downstream, proxy, cache, and upstream behavior
Prometheus pull and OTLP push both work.
Loki-VL-proxy marketing logoLoki-VL-proxy marketing logo

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 profileRequestRows compared🟢 Below Loki🟡 Close to Loki🟠 1–2× Loki🔴 Above 2× Loki
loki-defaultsfirst568365 (64.3%)183 (32.2%)14 (2.5%)6 (1.1%)
loki-defaultsrepeat765187 (24.4%)568 (74.2%)4 (0.5%)6 (0.8%)
alignedfirst447312 (69.8%)120 (26.8%)13 (2.9%)2 (0.4%)
alignedrepeat52922 (4.2%)500 (94.5%)2 (0.4%)5 (0.9%)
Workload (loki-defaults)Pairs🟢 / 🟡 / 🔴First request p50 · p90 · slowest: proxyLokiRepeat p50: proxyLoki
Metadata and label browser72 / 2 / 30.28 · 1.62 · 1.62 s0.10 · 0.38 · 0.38 s🟢 0.03 s0.10 s
Drilldown and Explore pages11885 / 25 / 80.12 · 1.06 · 6.73 s0.35 · 4.96 · 9.85 s🟡 0.03 s0.05 s
Log queries7939 / 39 / 10.02 · 0.08 · 0.24 s0.08 · 0.42 · 1.58 s🟢 0.01 s0.08 s
Metric queries366239 / 117 / 100.10 · 1.04 · 6.52 s0.27 · 4.65 · 44.02 s🟡 0.02 s0.02 s

First request by the time range a user picks, p50 · p90 · slowest pair:

WorkloadRangePairs🟢 / 🟡 / 🔴ProxyLoki
Drilldown and Explore pages1h4026 / 12 / 20.04 · 0.11 · 0.43 s0.24 · 0.33 · 0.64 s
Drilldown and Explore pages6h3627 / 8 / 10.16 · 0.76 · 1.09 s0.93 · 1.41 · 2.82 s
Drilldown and Explore pages24h4031 / 4 / 50.50 · 2.46 · 6.73 s4.16 · 5.53 · 9.85 s
Log queries1h314 / 26 / 10.05 · 0.08 · 0.09 s0.07 · 0.11 · 0.15 s
Log queries3h88 / 0 / 00.01 · 0.01 · 0.01 s0.08 · 0.14 · 0.14 s
Log queries6h2013 / 7 / 00.01 · 0.04 · 0.08 s0.08 · 0.41 · 0.50 s
Log queries24h2014 / 6 / 00.01 · 0.06 · 0.24 s0.11 · 1.50 · 1.58 s
Metric queries1h13069 / 57 / 40.03 · 0.12 · 0.36 s0.13 · 0.30 · 3.98 s
Metric queries6h10178 / 20 / 30.17 · 0.62 · 1.78 s0.66 · 1.60 · 14.84 s
Metric queries24h9983 / 13 / 30.63 · 2.49 · 6.52 s3.35 · 6.55 · 31.26 s

The heaviest queries for Loki, the ones a user waits for:

Query shapeRangeWorkloadProxyLokiProxy vs Loki
F1 sum by over a ratio of two per-stream metrics, 20s step24h-20sMetric queries4.14 s44.02 s🟢 10.6× faster
B2 sum by over a ratio of two per-stream metrics24hMetric queries3.81 s31.26 s🟢 8.2× faster
F3 avg by service of rate, 20s step24h-20sMetric queries1.82 s16.32 s🟢 9.0× faster
B2 sum by over a ratio of two per-stream metrics6hMetric queries1.05 s14.84 s🟢 14.1× faster
F2 count by service of count_over_time, 20s step24h-20sMetric queries0.01 s ‡12.39 s🟢 1376.4× faster
F4 sum of max by service,app, 20s step24h-20sMetric queries4.43 s12.37 s🟢 2.8× faster
DB1 label breakdown pod24hDrilldown and Explore pages1.33 s9.85 s🟢 7.4× faster
SF9 volume, logfmt label_format rename24hMetric queries3.58 s8.38 s🟢 2.3× faster
E3 logfmt latency_ms rate, production24hMetric queries1.86 s8.27 s🟢 4.4× faster
logfmt volume24hMetric queries1.46 s8.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 shapeRangeWorkloadProxyLokiProxy vs Loki
DP1 patterns of a plain-text service1hMetadata and label browser0.33 s0.02 s🔴 14.5× slower
DP2 patterns of an environment1hMetadata and label browser1.62 s0.27 s🔴 6.0× slower
LF29 logs, drop detected_level1hLog queries0.08 s0.01 s🔴 5.5× slower
LS8 json count by level_extracted, collision1hMetric queries0.14 s0.04 s🔴 3.4× slower
LS8 json count by level_extracted, collision6hMetric queries0.56 s0.17 s🔴 3.3× slower

Readiness by client: the Loki endpoints each client calls, their evidence, and the open differences it shows.

ClientLoki endpoints it callsRoutedCompared with Loki in testsProvenOpen differences it shows
Grafana Explore101010864
Logs Drilldown111111917
Grafana Loki datasource66641
Loki API clients2725191221
  • 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.

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.

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.

Client or GrafanaLoki-compatible read APITranslation and shapingTier0 and deeper cacheVictoriaLogs and vmalert

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.