Generated by
go run ./cmd/configdocfrom the flags incmd/proxy/main.goand the registry ininternal/config. Do not edit by hand.
Configuration reference
Every command-line flag of the proxy (284), grouped by category, with the Helm value that sets it. Narrative guidance lives in configuration.md; the bounds on work are collected in limits-registry.md.
Helm passes any flag through extraArgs.<flag>; the chart sets a few of them from dedicated values, marked chart-managed.
cache​
| Flag | Type | Default | Helm value | Description |
|---|---|---|---|---|
-cache-disabled | bool | false | extraArgs.cache-disabled | Disable the in-memory cache entirely (all requests pass through to the backend; useful for testing and cold-path measurement) |
-cache-max | int | 10000 | extraArgs.cache-max | Maximum cache entries |
-cache-max-bytes | int | defaultCacheMaxBytes | extraArgs.cache-max-bytes | Maximum in-memory L1 cache size in bytes |
-cache-ttl | duration | 1m0s | extraArgs.cache-ttl | Cache TTL for label/metadata queries |
-compat-cache-enabled | bool | true | extraArgs.compat-cache-enabled | Enable the safe Tier0 compatibility-edge response cache for cacheable GET read endpoints |
-compat-cache-max-percent | int | defaultCompatCachePercent | extraArgs.compat-cache-max-percent | Additional Tier0 compatibility-edge cache budget as a percent of -cache-max-bytes (0 disables, max 50); does not reduce primary L1. One entry holds at most a tenth of this budget: a larger query, query_range or series answer is kept in primary L1 memory instead (up to a tenth of -cache-max-bytes), where it shares L1 with the other cached answers; such an answer stays on the replica that computed it (not on disk, not pushed to peers) |
-disk-cache-codec | string | "s2" | extraArgs.disk-cache-codec | Disk cache codec: s2, zstd, gzip or raw; new records identify their own codec |
-disk-cache-compress | bool | true | extraArgs.disk-cache-compress | Compress disk cache values using -disk-cache-codec; false writes raw records |
-disk-cache-flush-bytes | int64 | 4194304 | extraArgs.disk-cache-flush-bytes | Flush after this many queued bytes, including keys and queue overhead |
-disk-cache-flush-interval | duration | 5s | extraArgs.disk-cache-flush-interval | Write buffer flush interval |
-disk-cache-flush-size | int | 1000 | extraArgs.disk-cache-flush-size | Flush write buffer after N entries |
-disk-cache-max-buffer-bytes | int64 | 16777216 | extraArgs.disk-cache-max-buffer-bytes | Maximum pending and flushing bytes combined, including queue overhead |
-disk-cache-max-bytes | int64 | 0 | extraArgs.disk-cache-max-bytes | Maximum logical L2 record and key bytes; LRU eviction (0 = no byte cap); bbolt file may retain free pages |
-disk-cache-max-entries | int | 100000 | extraArgs.disk-cache-max-entries | Maximum persisted L2 entries; least recently used entries are evicted |
-disk-cache-max-index-bytes | int64 | 16777216 | extraArgs.disk-cache-max-index-bytes | Maximum estimated L2 recency-index bytes (128 plus key length per entry) |
-disk-cache-min-ttl | duration | 30s | extraArgs.disk-cache-min-ttl | Minimum entry TTL eligible for L2 disk cache writes (shorter TTL entries stay in-memory only). Empty label and label-value answers are cached for max(30s, this, -peer-write-through-min-ttl) so they replace older non-empty copies |
-disk-cache-path | string | (empty) | persistence.* (chart-managed) | Path to L2 disk cache (bbolt). Empty disables. |
-error-cache-data-ttl | duration | 5s | extraArgs.error-cache-data-ttl | How long a failure read from the data in the request's window (Loki's series limit, a line or response size limit, a JSON parser or unwrap conversion error under a metric) is held per request; 0 holds none. The same window fails the same way until new lines arrive |
-error-cache-enabled | bool | true | extraArgs.error-cache-enabled | Hold failed read answers for a short, class-dependent time so identical requests (refresh loops, dashboards, retries) answer the held failure byte for byte instead of asking VictoriaLogs again; failures caused by the client (its cancellation or deadline), by the proxy's own queue or load shedding, by credentials, or by a proxy defect are never held, except VictoriaLogs' refusal of the query the proxy wrote, which the same release always gives (see -error-cache-vl-refusal-ttl). Identical requests in flight share one run either way (see -coalescer-disabled) |
-error-cache-max-bytes | int | 8388608 | extraArgs.error-cache-max-bytes | Most bytes of failed answers held per replica (oldest evicted first; a single answer above 64 KiB is never held); 0 uses the default |
-error-cache-max-entries | int | 4096 | extraArgs.error-cache-max-entries | Most failed answers held per replica (oldest evicted first); 0 uses the default |
-error-cache-peer-sync | bool | true | extraArgs.error-cache-peer-sync | Push a VictoriaLogs refusal held for 30s or more to every peer of the peer cache, so the fleet asks VictoriaLogs about once per hold; a peer holds it only when it runs the same build against the same VictoriaLogs release with the same routing configuration, and an answer computed with forwarded credentials stays on its replica |
-error-cache-transient-ttl | duration | 1s | extraArgs.error-cache-transient-ttl | How long a backend failure (VictoriaLogs 5xx, 429 or queue timeout, a refused or reset connection) is held per request; 0 holds none. A timeout or an aborted body is never held. Each replica asks VictoriaLogs at most once per this TTL per failing request, and the first request after VictoriaLogs recovers answers within it |
-error-cache-vl-refusal-ttl | duration | 5m0s | extraArgs.error-cache-vl-refusal-ttl | How long a VictoriaLogs refusal of the query the proxy wrote (a parse error, a stats shape VictoriaLogs does not run, a query over its -search.maxQueryLen) is held per request, a parse or stats shape refusal for every window of the query; keyed by the VictoriaLogs release and the configuration, so a release change or a reload asks again. 0 holds none. At 30s or more a refusal VictoriaLogs answered is pushed to every peer (see -error-cache-peer-sync) |
-label-values-hot-limit | int | 200 | extraArgs.label-values-hot-limit | Default number of label values returned for empty-query browse requests when indexed cache is enabled |
-label-values-index-max-entries | int | 200000 | extraArgs.label-values-index-max-entries | Maximum indexed values retained per tenant+label when indexed label-values cache is enabled |
-label-values-index-persist-interval | duration | 30s | extraArgs.label-values-index-persist-interval | How often to persist the in-memory label-values index snapshot to disk |
-label-values-index-persist-path | string | (empty) | extraArgs.label-values-index-persist-path | Path to persisted label-values index snapshot JSON file. Empty disables persistence. |
-label-values-index-startup-peer-warm-timeout | duration | 5s | extraArgs.label-values-index-startup-peer-warm-timeout | Maximum time to wait for startup label-values index warm from peers when disk snapshot is stale or missing |
-label-values-index-startup-stale-threshold | duration | 1m0s | extraArgs.label-values-index-startup-stale-threshold | Treat on-disk label-values index snapshot older than this as stale and warm from peers before serving |
-label-values-indexed-cache | bool | false | extraArgs.label-values-indexed-cache | Enable indexed browse cache for /loki/api/v1/label/{name}/values (hot subset first for empty-query requests) |
-labels-cache-ttl | duration | 0 | extraArgs.labels-cache-ttl | Cache TTL for /labels and /label/{name}/values responses (default 5m). Keep-warm interval is derived automatically. 0 uses the default. |
-labels-cache-warm | bool | true | extraArgs.labels-cache-warm | Warm the labels cache for the 1h/6h/24h/7d time-picker presets at startup and keep them warm in the background (every 75% of -labels-cache-ttl). Each refresh is a label-name scan of up to 7 days in VictoriaLogs; disable it on replicas that serve no interactive label pickers. |
-metadata-edge-refresh-budget | duration | 100ms | extraArgs.metadata-edge-refresh-budget | How long a near-now /labels or /label/{name}/values request waits for its edge refresh from VictoriaLogs before it is answered from the last answer within -metadata-max-staleness. An idle VictoriaLogs answers the edge in 5-40 ms (exact answers); under heavy load it took 0.35-2.6 s (bounded-stale answers). 0 answers from the last answer at once whenever one is within the bound. |
-metadata-max-staleness | duration | 10s | extraArgs.metadata-max-staleness | Longest a near-now /labels or /label/{name}/values answer may lag VictoriaLogs while its edge refresh runs in the background, measured from the start of the VictoriaLogs read behind it. A request ending within -max-metadata-cache-freshness of now whose cached answer is older than -recent-tail-refresh-max-staleness waits -metadata-edge-refresh-budget for the refresh, then gets the last answer if this replica read it within this bound (marked X-Proxy-Stale-Response); past it, the request waits for VictoriaLogs. Loki reads its index and never lags; 0 keeps that exactness at the cost of waiting for VictoriaLogs under load. |
-parse-risk-probe-cache-ttl | duration | 1h0m0s | extraArgs.parse-risk-probe-cache-ttl | How long a window found free of parse-risk lines (and the level-presence mask of a window) is remembered, counted from the check of its oldest part, so a long-running dashboard probes only what is new (default matches -query-range-extent-cache-ttl); a line that turns risky (a JSON line with a colliding key, a partial parse) written later than -parse-risk-probe-settle after its timestamp into a remembered window is seen once the entry expires. The row a | json metric's lookup of a line Loki's parser rejects found (at most 64 KiB) is remembered as long, so a later window holding it skips the stats query and the parse checks. Kept in memory only. 0 remembers nothing (every request probes its whole window) |
-parse-risk-probe-settle | duration | 5m0s | extraArgs.parse-risk-probe-settle | The part of a window newer than now minus this is never remembered by -parse-risk-probe-cache-ttl and is probed on every request, so lines that arrive late for recent timestamps are still seen |
-query-range-adaptive-cooldown | duration | 30s | extraArgs.query-range-adaptive-cooldown | Minimum time between adaptive query_range parallelism adjustments |
-query-range-adaptive-max-parallel | int | 8 | extraArgs.query-range-adaptive-max-parallel | Maximum adaptive query_range window parallelism |
-query-range-adaptive-min-parallel | int | 2 | extraArgs.query-range-adaptive-min-parallel | Minimum adaptive query_range window parallelism |
-query-range-adaptive-parallel | bool | true | extraArgs.query-range-adaptive-parallel | Enable adaptive query_range window parallelism based on backend latency/error feedback |
-query-range-align-windows | bool | true | extraArgs.query-range-align-windows | Align query_range split windows to fixed interval boundaries for overlap cache reuse |
-query-range-background-warm | bool | true | extraArgs.query-range-background-warm | Warm failed query_range windows in background after partial response |
-query-range-background-warm-max-windows | int | 24 | extraArgs.query-range-background-warm-max-windows | Maximum query_range windows warmed in background after partial response |
-query-range-error-backoff-threshold | float64 | 0.02 | extraArgs.query-range-error-backoff-threshold | Adaptive backoff threshold for backend fetch errors (0-1 ratio) |
-query-range-expensive-hit-threshold | int64 | 2000 | extraArgs.query-range-expensive-hit-threshold | Prefilter hit threshold above which a query_range window is treated as expensive |
-query-range-expensive-max-parallel | int | 1 | extraArgs.query-range-expensive-max-parallel | Maximum window parallelism for expensive query_range windows |
-query-range-extent-cache | bool | true | extraArgs.query-range-extent-cache | Answer the VictoriaLogs stats_query_range calls of metric query_range requests from buckets already read, asking VictoriaLogs only for missing and recent buckets (like Loki's results cache extents); buckets newer than -query-range-freshness are always read, older ones are kept in the response cache tiers for -query-range-extent-cache-ttl. The window evaluator's answers are kept per evaluation time the same way (settled steps), so a moved window evaluates only the steps it lacks |
-query-range-extent-cache-ttl | duration | 1h0m0s | extraArgs.query-range-extent-cache-ttl | How long buckets and settled steps kept by -query-range-extent-cache are reused, counted from their oldest read (Loki's results cache default validity, 1h); a row written later than -query-range-freshness after its timestamp shows once they expire. 0 keeps none |
-query-range-freshness | duration | 10m0s | extraArgs.query-range-freshness | Near-now freshness boundary; windows newer than now-freshness use recent cache TTL |
-query-range-history-cache-ttl | duration | 24h0m0s | extraArgs.query-range-history-cache-ttl | Cache TTL for historical query_range windows older than -query-range-freshness |
-query-range-latency-backoff | duration | 3s | extraArgs.query-range-latency-backoff | Adaptive backoff threshold: reduce parallelism when backend fetch latency exceeds this value |
-query-range-latency-target | duration | 1.5s | extraArgs.query-range-latency-target | Adaptive target backend fetch latency per window |
-query-range-max-parallel | int | 2 | extraArgs.query-range-max-parallel | Maximum number of query_range windows fetched in parallel when adaptive parallelism is disabled |
-query-range-partial-responses | bool | false | extraArgs.query-range-partial-responses | Allow partial query_range responses on retryable backend failures |
-query-range-prefilter-index-stats | bool | true | extraArgs.query-range-prefilter-index-stats | Use /select/logsql/hits preflight to skip empty query_range windows before log fanout |
-query-range-prefilter-min-windows | int | 8 | extraArgs.query-range-prefilter-min-windows | Minimum split windows required before enabling query_range prefilter |
-query-range-recent-cache-ttl | duration | 0 | extraArgs.query-range-recent-cache-ttl | Cache TTL for near-now query_range windows (0 disables near-now result caching) |
-query-range-split-interval | duration | 1h0m0s | extraArgs.query-range-split-interval | Time window size used for query_range split/merge (for example 15m, 1h, 24h) |
-query-range-stream-aware-batching | bool | true | extraArgs.query-range-stream-aware-batching | Reduce query_range batch parallelism for expensive windows estimated from prefilter hits |
-query-range-windowing | bool | true | extraArgs.query-range-windowing | Enable query_range window splitting and window-level cache reuse for log queries |
-recent-tail-refresh-enabled | bool | true | extraArgs.recent-tail-refresh-enabled | Bypass stale near-now cache hits and fetch latest backend data while preserving historical cache |
-recent-tail-refresh-max-staleness | duration | 2s | extraArgs.recent-tail-refresh-max-staleness | Maximum acceptable cache age for near-now (live-tail) requests before the response cache is bypassed and fresh data is fetched. Lower = fresher live tail, more backend load; raise to coalesce rapid refreshes. |
-recent-tail-refresh-window | duration | 2m0s | extraArgs.recent-tail-refresh-window | How close request end must be to now to enable near-now cache freshness bypass |
cold storage​
| Flag | Type | Default | Helm value | Description |
|---|---|---|---|---|
-cold-backend | string | (empty) | extraArgs.cold-backend | Cold storage backend URL (Victoria Lakehouse); a path is kept as a prefix. Empty disables cold routing. |
-cold-boundary | duration | 168h0m0s | extraArgs.cold-boundary | Data older than this boundary routes to cold backend |
-cold-enabled | bool | false | extraArgs.cold-enabled | Enable cold storage backend routing |
-cold-manifest-refresh | duration | 5m0s | extraArgs.cold-manifest-refresh | How often to refresh cold backend manifest range |
-cold-overlap | duration | 1h0m0s | extraArgs.cold-overlap | Overlap window around cold boundary where both hot and cold are queried |
-cold-timeout | duration | 30s | extraArgs.cold-timeout | Timeout for cold backend requests |
compatibility​
| Flag | Type | Default | Helm value | Description |
|---|---|---|---|---|
-align-queries-with-step | bool | true | extraArgs.align-queries-with-step | Move the start and end of a metric query_range request down to a multiple of its step before evaluating it, as Loki's query frontend does with query_range.align_queries_with_step (-querier.align-querier-with-step; false in Loki's flag defaults, true in its example configuration and Helm chart). On by default: answers share that Loki's evaluation grid, and a refresh that moves the window by less than a step maps onto the same request and is served from the caches. Log queries, instant queries, step-less requests, /loki/api/v1/patterns and Grafana Logs Drilldown query-split residual chunks are not changed. Set false to evaluate at the start the client sent |
-backend-allow-unsupported-version | bool | false | extraArgs.backend-allow-unsupported-version | Allow startup with backend versions lower than -backend-min-version (at your own risk). Ignored when --backend-version-strict=true. |
-backend-feature-probes | bool | true | extraArgs.backend-feature-probes | Probe VictoriaLogs for the features the proxy's gates depend on (a few tiny read-only queries over an empty one-second window at startup and every -backend-version-reprobe-interval, sent with the proxy's own backend auth and never counted as client requests). A probe decides a gate when no release is readable (behind vmauth without a /metrics route) and cross-checks it when one is: a gate the observed behaviour contradicts is turned by the behaviour and reported. false decides the gates from the release alone; an unreadable release then holds the v1.49.0 floor |
-backend-min-version | string | "v1.49.0" | extraArgs.backend-min-version | Minimum VictoriaLogs version considered fully supported at startup (v1.49.0, the latest v1.4x release; every v1.5x release is supported) |
-backend-version-reprobe-interval | duration | 5m0s | extraArgs.backend-version-reprobe-interval | How often the proxy reads the VictoriaLogs release again (/metrics) and probes the feature gates (-backend-feature-probes), jittered by 10%, one round at a time per replica, so an upgrade or a rollback of VictoriaLogs changes the gates without a proxy restart. A release leaves the lowest-release window after six intervals without being seen (behind a load balancer each read reaches one random member). 0 disables the periodic round (the release is still read at startup and, while unknown, retried on traffic every 5 minutes); a non-zero value below 10s is raised to 10s. GET /admin/capabilities shows the result |
-backend-version-strict | bool | false | extraArgs.backend-version-strict | When true, /health failure, non-2xx response, or missing/sub-min backend semver causes startup to fail. Default false (warn only). Overrides --backend-allow-unsupported-version when both are set. |
-derived-fields | string | (empty) | extraArgs.derived-fields | name |
-detected-level-body-scan | bool | true | extraArgs.detected-level-body-scan | Derive detected_level from the log line (JSON, logfmt, keywords) when a row has no stored level field, as Loki does; false uses stored level fields only with an unknown fallback |
-drilldown-burst-max-fields | int | 30 | extraArgs.drilldown-burst-max-fields | maximum fields per coalesced VL burst call; fields beyond this cap form a second call |
-drilldown-burst-window-ms | int | 50 | extraArgs.drilldown-burst-window-ms | time window in ms for coalescing concurrent Drilldown Fields per-field count queries into a single fused VL conditional-stats call (0 disables the coalescer) |
-drilldown-field-batch-max-fields | int | 6 | extraArgs.drilldown-field-batch-max-fields | Deprecated, no effect: see -drilldown-field-batch-window-ms. Accepted so existing command lines keep working |
-drilldown-field-batch-window-ms | int | 100 | extraArgs.drilldown-field-batch-window-ms | Deprecated, no effect: Logs Drilldown field breakdowns are answered exactly, one stats_query_range call each. Accepted so existing command lines keep working |
-drilldown-series-limit-instant-split-interval | duration | 1h0m0s | extraArgs.drilldown-series-limit-instant-split-interval | In -drilldown-series-limit-mode=loki, Loki's split_instant_metric_queries_by_interval (default 1h): a Logs Drilldown instant answer over the series limit whose range is longer than it keeps the series without the partial-result warning, as deployed Loki's split instant answer does. 0 always warns. Per tenant: split_instant_metric_queries_by_interval in -tenant-limits |
-drilldown-series-limit-mode | string | "loki" | extraArgs.drilldown-series-limit-mode | How a Logs Drilldown range answer over -max-stats-query-series (or the tenant's max_query_series) is cut, with Loki's partial-result warning either way: loki (default) answers as deployed Loki does, per split of -drilldown-series-limit-split-interval (Loki's split_queries_by_interval), with the series met first in each split, every one ending at the step where the series met so far pass the limit (a breakdown whose series all start at once shows one step per split); busiest keeps the busiest series over the whole range. Instant answers keep the busiest series in both modes. |
-drilldown-series-limit-split-interval | duration | 1h0m0s | extraArgs.drilldown-series-limit-split-interval | In -drilldown-series-limit-mode=loki, the split interval of Loki's query frontend (Loki's split_queries_by_interval, default 1h) a Logs Drilldown range answer over the series limit is cut by: Loki splits a range request at the multiples of the interval inside it and cuts each split's answer on its own, at the step where the series met so far in the split pass the limit. 0 cuts the request as one split. Per tenant: split_queries_by_interval in -tenant-limits |
-emit-structured-metadata | bool | true | extraArgs.emit-structured-metadata | Include Loki 3-tuple stream values [timestamp, line, metadata] in query responses |
-error-response-message-field | bool | true | extraArgs.error-response-message-field | Deprecated and ignored. Error bodies are Loki's own: text/plain with the message alone (and Prometheus JSON on the rules and alerts API), so there is no JSON envelope to add a message field to. The flag is still accepted so existing deployments start. |
-exact-parser-series-identity | bool | false | extraArgs.exact-parser-series-identity | Name the series of a metric over | json or | logfmt with the labels those parsers extracted, as Loki does, instead of the stream. Every such query is then evaluated from rows (bounded by -manual-metric-row-budget) rather than pushed down to VictoriaLogs stats, so it costs far more on wide ranges; | regexp and | pattern captures are always part of the identity because the query names them |
-extra-label-fields | string | (empty) | extraArgs.extra-label-fields | host.id,custom.pipeline.processing |
-field-mapping | string | (empty) | extraArgs.field-mapping | vl_field |
-json-line-fields-as-line-keys | bool | false | extraArgs.json-line-fields-as-line-keys | Read every stored field of a row whose _msg is VictoriaLogs' missing-message placeholder (its -defaultMsgValue, or -backend-default-msg-value) as a key of the row's JSON line, as Loki holds a JSON line pushed to VictoriaLogs' Loki push route without disable_message_parsing=1: the fields are no labels until | json (structured metadata without a parser, parsed labels after | logfmt otherwise), and a query that reads a label no stage can give such a line (an unwrap or a label filter after | logfmt or without a parser) leaves those rows out, in VictoriaLogs. VictoriaLogs cannot tell such a line's keys from structured metadata pushed beside it, so with this on that structured metadata is hidden too, and so are the fields of any other row stored without a message (jsonline rows and OpenTelemetry map bodies without one, attributes included): leave it off when such rows carry structured metadata or attributes, and prefer pushing with disable_message_parsing=1, which keeps the line and needs no flag. Acts in the Loki-compatible profile only (-label-style=underscores with -metadata-field-mode=translated, the defaults) and needs a non-empty VictoriaLogs -defaultMsgValue |
-label-browse-extensions | string | "auto" | extraArgs.label-browse-extensions | error-response-message-field |
-label-style | string | "underscores" | extraArgs.label-style | metadata-field-mode |
-logql-dotted-names | string | "auto" | extraArgs.logql-dotted-names | label-browse-extensions |
-metadata-default-lookback | duration | 12h0m0s | extraArgs.metadata-default-lookback | Default time window for /labels, /label/{name}/values, and /series when the client omits start/end. 0 disables (unbounded scan). |
-metadata-field-mode | string | "translated" | extraArgs.metadata-field-mode | translate-otel-attributes |
-patterns-autodetect-from-queries | bool | false | extraArgs.patterns-autodetect-from-queries | Warm /loki/api/v1/patterns cache from successful query/query_range log responses (opt-in global autodetect) |
-patterns-counts | bool | true | extraArgs.patterns-counts | Answer /loki/api/v1/patterns for a stream selector from VictoriaLogs' counts of every line in the range (one stats query over the whole range), as Loki counts every line it ingested. A request it cannot answer that way (more groups than -patterns-max-counts-rows, rows without a message) falls back to sampling lines. Set false to always sample lines |
-patterns-custom | string | (empty) | extraArgs.patterns-custom | patterns-custom-file |
-patterns-custom-file | string | (empty) | extraArgs.patterns-custom-file | Path to custom Drilldown patterns file (JSON array or newline-separated text) loaded on startup |
-patterns-enabled | bool | true | extraArgs.patterns-enabled | Enable /loki/api/v1/patterns endpoint (Grafana Logs Drilldown patterns) |
-patterns-exact-max-lines | int | 200000 | extraArgs.patterns-exact-max-lines | Read at most this many lines from VictoriaLogs to answer /loki/api/v1/patterns for a stream selector with the patterns Loki mines from them: each stream and level mined apart, oldest line first, with Loki's cluster limits. A range with more lines is answered from VictoriaLogs' counts (-patterns-counts) instead, which mines the lines of a level's streams together. Reading costs about 200 bytes per line of transfer and a sort in VictoriaLogs' memory; 0 turns the exact reading off |
-patterns-full-range | bool | true | extraArgs.patterns-full-range | Answer a /loki/api/v1/patterns range longer than Loki's pattern retention (3h) over all of it: the patterns the state answers (Loki's), their samples before the state's counted from VictoriaLogs a window at a time, each line counted in the pattern it matches as Drilldown's pattern filter (|>) matches it; settled windows are cached and shared with peers. false answers such a range with the retention's samples alone, as Loki does |
-patterns-persist-interval | duration | 30s | extraArgs.patterns-persist-interval | How often to persist in-memory patterns snapshots to disk |
-patterns-persist-path | string | (empty) | extraArgs.patterns-persist-path | Path to persisted patterns snapshot JSON file. Empty disables persistence. |
-patterns-scope | string | "stream" | extraArgs.patterns-scope | How /loki/api/v1/patterns mines a selector's lines: stream (Loki's pattern ingester: one miner per stream and level, so a pattern needs 30 lines in one stream's clusters) or selector (one miner per level for all the selector's streams, so streams that each hold a few lines, such as a stream label that changes per line or short-lived pods, share patterns, and a JSON line whose message is under Loki's 4 tokens is mined as the whole line; not Loki's answer) |
-patterns-startup-peer-warm-timeout | duration | 5s | extraArgs.patterns-startup-peer-warm-timeout | Maximum time to wait for startup patterns snapshot warm from peers |
-patterns-startup-stale-threshold | duration | 1m0s | extraArgs.patterns-startup-stale-threshold | Treat on-disk patterns snapshot older than this as stale and warm from peers before serving |
-patterns-state-max-build-lines | int | 2000000 | extraArgs.patterns-state-max-build-lines | Build the /loki/api/v1/patterns state in the background for a selector whose lines over Loki's pattern retention (3h) are more than -patterns-exact-max-lines and at most this many: an hour of lines at a time, sorted by stream and time, while the selector's requests are answered from VictoriaLogs' counts until the state is built; one build runs at a time. 0 builds none |
-patterns-state-max-bytes | int64 | 268435456 | extraArgs.patterns-state-max-bytes | Memory the /loki/api/v1/patterns state of all tenants may hold: each stream's clusters at each level trained on every line read since the state was built from Loki's pattern retention (3h), as Loki's pattern ingester keeps them, so a refresh reads only the lines after what was read and templates come from every line; past it the least recently used tenant's state is dropped. A selector whose lines over the retention exceed -patterns-exact-max-lines is answered without the state; 0 turns the state off |
-patterns-state-stream-idle | duration | 5m0s | extraArgs.patterns-state-stream-idle | How long a stream may read no line before the /patterns state keeps its clusters as their patterns and samples alone, freeing the rest; a stream that writes again after it starts new clusters |
-query-plan-lowering | bool | true | extraArgs.query-plan-lowering | Translate the queries the typed query-plan lowering covers natively with it instead of the string translator: log queries with a stream selector, line filters, pattern filters (|> and !>) and label filters, no parser stage. The lowering writes the same VictoriaLogs query, byte for byte, under every translator option (held by the corpus shadow in CI), so answers, caches and VictoriaLogs requests do not change, except that a label called not, in, options, and, or, contains_all, contains_any, contains_common_case or equals_common_case is written quoted, which VictoriaLogs needs and the string translator leaves out; also a range function over an unwrapped label whose series a keep before the unwrap decides, which the lowering groups by the labels the keep leaves, as Loki does, where the string translator groups by the stream; also sum, max, min or avg over a range function taken per series of an unwrapped label after a json or logfmt parser with no keep, which the lowering groups by the stream and a hash of each line's parsed labels, Loki's series, where the string translator groups by the stream and each line; every other query, and any query the lowering cannot translate, goes to the string translator. Counted as result=flipped in loki_vl_proxy_lowering_shadow_total. false is the rollback: every query is translated by the string translator |
-query-stats-exact-log-lines | bool | false | extraArgs.query-stats-exact-log-lines | With -query-stats-mode=loki, count a log query's totalLinesProcessed with VictoriaLogs when its answer cannot give it (it filled its limit, or it filters lines) and the panel's count answer is not held: one timestamp-only count of its stream selector over the 1h pieces Loki reads, per log query cache miss. Off by default: the lines are estimated from the answer, capped at its entries times the pieces read. Loki's own figure for a limit-filled query depends on its chunk layout; this reports the pieces read, whole |
-query-stats-exact-metric-bytes | bool | false | extraArgs.query-stats-exact-metric-bytes | With -query-stats-mode=loki, read a metric query's totalBytesProcessed from VictoriaLogs: the line bytes of its stream selector over its window, with a volume request sent next to the query (about six times the VictoriaLogs time of a count over the same window; cached like volume answers). Off by default: the bytes are estimated as the lines counted times the selector's mean line size, taken from its log answers |
-query-stats-mode | string | "loki" | extraArgs.query-stats-mode | Accounting of the data.stats object of query, query_range, volume and volume_range answers (the Stats of Grafana's query inspector and the Logs Drilldown footer). loki (the default) emulates Loki's numbers: the lines and bytes of the pieces Loki would have read (a log query that fills its limit stops after the piece holding its last entry; lines estimated from the answer's entries when no volume answer of the panel is known; bytes as lines times the mean line size), Loki's splits and shards (1h pieces), cache hits as Loki reports them (log and instant answers replay the computation; metric query_range hits are results-cache hits). victorialogs reports what the proxy measured: the rows VictoriaLogs returned and their line bytes, a metric answer's own counts, VictoriaLogs calls as splits, nothing processed on a cache hit |
-stream-fields | string | (empty) | extraArgs.stream-fields | app,env,namespace |
-tail.allowed-origins | string | (empty) | extraArgs.tail.allowed-origins | Comma-separated WebSocket Origin allowlist for /loki/api/v1/tail. Empty denies browser origins. |
-tail.backend-retry-window | duration | 30s | extraArgs.tail.backend-retry-window | How long a live tail keeps its websocket open while VictoriaLogs fails for a reason a retry can fix (connection refused or reset, a timeout, a stream that ends or breaks, a 429 or 5xx answer): the proxy reopens the stream, or polls again, with a jittered backoff from 250 ms up to 5 s, and resumes from the last line sent without repeating or skipping one. Past the window, and at once for a failure no retry fixes (a malformed or oversize row, a 4xx VictoriaLogs answer), the tail closes with 1011 and Loki's text. 0 closes on the first failure. |
-tail.mode | string | "auto" | extraArgs.tail.mode | Tail streaming mode: auto (native with synthetic fallback), native, or synthetic |
-tail.settle-delay | duration | 5s | extraArgs.tail.settle-delay | How far behind now a live tail reads, so a line VictoriaLogs makes searchable out of order is still delivered: the native and auto tails send it as VictoriaLogs' tail offset (lines arrive about this long after they are written), and the polled tail reads this span again on every poll and drops the lines it already sent. VictoriaLogs makes a row searchable when its rows-buffer shard flushes (about 1 s on a single node) and its live tail skips a row older than the newest of its stream already sent, so a shorter delay can lose lines: 1-2 s covers one single-node buffer flush, not client batching or a cluster vlinsert hop. 0 reads up to now. |
-translate-otel-attributes | bool | true | extraArgs.translate-otel-attributes | Translate known OTel semantic convention labels from underscore to dotted form in upstream queries (set false to preserve client label names) |
-vl-refusal-prediction | bool | true | extraArgs.vl-refusal-prediction | Answer a VictoriaLogs call that the detected VictoriaLogs release refuses before reading data (a pipe it lacks, a stats shape it refuses, a query over the -search.maxQueryLen its last refusal named, a query its handler would crash on) without sending it, as VictoriaLogs' refusal would be answered; nothing is predicted before the release is detected |
limits​
| Flag | Type | Default | Helm value | Description |
|---|---|---|---|---|
-backend-heavy-query-min-range | duration | 6h0m0s | extraArgs.backend-heavy-query-min-range | Time range from which VictoriaLogs stats, hits and unbounded raw calls count as heavy for -backend-max-concurrent-heavy-queries, and metadata listings count as long-range for -backend-max-concurrent-metadata-scans. Must be > 0 |
-backend-heavy-query-queue-wait | duration | 20s | extraArgs.backend-heavy-query-queue-wait | How long the heavy VictoriaLogs calls of one request wait, together, for -backend-max-concurrent-heavy-queries slots, and how long each long-range metadata scan waits for a -backend-max-concurrent-metadata-scans slot, before the request fails with 429. 0 rejects immediately when all slots are busy |
-backend-max-buffered-response-bytes | int | 67108864 | extraArgs.backend-max-buffered-response-bytes | Maximum bytes the proxy reads from one VictoriaLogs response it buffers (stats, volume and binary-operand responses, the encoded metric result, the Drilldown field, stream and label-filter listings, and the cold backend's backward chunks). A gzip or zstd response may also decode to the larger of 256 MiB and this value. Exceeding it returns HTTP 502 naming this flag instead of a truncated result. Proxy memory grows with this value times the concurrent requests that buffer a response. 0 uses the built-in default of 64 MiB |
-backend-max-concurrent-heavy-queries | int | 2 | extraArgs.backend-max-concurrent-heavy-queries | Maximum concurrent heavy VictoriaLogs calls per replica: raw-row metric fetches (any /select/logsql/query bound above 10000 rows, which includes a log query whose limit is higher), and stats or hits calls spanning at least -backend-heavy-query-min-range or finer than 11000 buckets. Further heavy calls queue for -backend-heavy-query-queue-wait, then fail with 429 "too many outstanding requests". VictoriaLogs lets each stats pipe use up to 40% of its allowed memory, so the default of 2 keeps concurrent stats state within its memory budget. 0 disables the limiter |
-backend-max-concurrent-metadata-scans | int | 8 | extraArgs.backend-max-concurrent-metadata-scans | Ceiling of the adaptive limit on concurrent long-range VictoriaLogs metadata scans per replica: stream_field_names, stream_field_values, field_names, field_values and streams calls spanning at least -backend-heavy-query-min-range or without a time range, and the day bucket scans of the label inventory for such listings. Selects VictoriaLogs runs for others (read from its /metrics) count against the limit; it starts at 2, grows while scans that used it stay within -backend-metadata-scan-latency-tolerance of their no-load duration, shrinks on slow scans or backend failures, and no scan starts while VictoriaLogs lacks -backend-metadata-scan-memory-headroom. Each scan waits at most -backend-heavy-query-queue-wait, then the request fails with 429; background inventory refreshes skip instead of waiting. 0 disables the limiter |
-backend-metadata-scan-latency-tolerance | float64 | 1.5 | extraArgs.backend-metadata-scan-latency-tolerance | How many times its no-load duration (per row when the rows are known) a long-range metadata scan that ran beside others may take before the adaptive limit shrinks by 20%. Must be >= 1; 0 uses the default |
-backend-metadata-scan-memory-headroom | float64 | 0.4 | extraArgs.backend-metadata-scan-memory-headroom | Fraction of the memory available to VictoriaLogs (vm_available_memory_bytes on its /metrics) that long-range metadata scans must leave free: a scan is admitted only while the memory VictoriaLogs has in use, plus the estimated cost of in-flight scans, of the selects it runs for others and of this one, stays below 1 minus this fraction. Costs are learned per endpoint, range and tenant from the memory growth while scans ran; a listing never measured runs alone. 0 disables the memory gate (latency and failure feedback remain) |
-backend-min-concurrent-metadata-scans | int | 1 | extraArgs.backend-min-concurrent-metadata-scans | Floor of the adaptive limit on concurrent long-range VictoriaLogs metadata scans per replica: latency and failure feedback never shrink the limit below it, and below it a replica may start a scan while others' long work uses up to a quarter of VictoriaLogs' select slots. VictoriaLogs' full select slots, memory headroom and a silent /metrics still hold scans back. Must be <= -backend-max-concurrent-metadata-scans; 0 uses the default |
-binary-metric-max-arrays | int | 2000000 | extraArgs.binary-metric-max-arrays | Maximum JSON arrays one binary metric expression may allocate while joining operands. 0 uses the built-in default of 2000000 |
-binary-metric-max-operand-bytes | int | 268435456 | extraArgs.binary-metric-max-operand-bytes | Maximum bytes of operand responses one binary metric expression may capture. 0 uses the built-in default of 256 MiB |
-default-max-query-length | duration | 721h0m0s | extraArgs.default-max-query-length | Loki's max_query_length for every tenant without a per-tenant limit: a query_range, series, labels, label values, detected labels, detected fields, detected field values, index stats or volume request whose range is longer fails with Loki's 400. The default is Loki's (721h, published as 30d1h); 0 turns the limit off |
-detected-fields-max-scan-lines | int | 2000 | extraArgs.detected-fields-max-scan-lines | Maximum log lines the detected_fields / detected_field values scan reads per request. 0 uses the built-in default of 2000 |
-drilldown-max-stats-buckets | int | 120 | extraArgs.drilldown-max-stats-buckets | Deprecated, no effect: Logs Drilldown breakdowns are answered on the requested step, as Loki answers them. Accepted so existing command lines keep working |
-http-conn-max-age | duration | 10m0s | extraArgs.http-conn-max-age | Maximum lifetime for downstream HTTP/1.x keepalive connections before responding with Connection: close (0 disables) |
-http-conn-max-age-jitter | duration | 2m0s | extraArgs.http-conn-max-age-jitter | Jitter applied to downstream HTTP/1.x connection age rotation to avoid synchronized reconnects |
-http-conn-max-requests | int | 256 | extraArgs.http-conn-max-requests | Maximum downstream HTTP/1.x requests served on one keepalive connection before responding with Connection: close (0 disables) |
-http-conn-overload-max-age | duration | 1m30s | extraArgs.http-conn-overload-max-age | Shorter downstream HTTP/1.x connection lifetime applied while query_range backpressure is active (0 disables overload shedding) |
-http-max-body-bytes | int64 | 10485760 | extraArgs.http-max-body-bytes | HTTP max request body size (default: 10MB) |
-http-max-header-bytes | int | 1048576 | extraArgs.http-max-header-bytes | HTTP max header size (default: 1MB) |
-label-filter-refill-max-pages | int | 8 | extraArgs.label-filter-refill-max-pages | Loki-compatible profile: more pages of at most limit rows a log query reads when a Loki label filter on a log line key no earlier stage exposes dropped rows VictoriaLogs matched, so the page still holds limit lines. A response reads at most (1 + N) x limit rows; 0 reads no further page, and such a page can return fewer lines than the limit. |
-label-values-max-response-bytes | int | 67108864 | extraArgs.label-values-max-response-bytes | Maximum bytes of the VictoriaLogs answer to a /loki/api/v1/label/{name}/values request: one response, or the size the merged listing would have as one response when the metadata inventory lists it from time buckets. Above it the request fails like Loki's querier above grpc_server_max_send_msg_size: HTTP 500 rpc error: code = ResourceExhausted desc = grpc: trying to send message larger than max (N vs. LIMIT) naming this flag, and nothing is cached. Per tenant as label_values_max_response_bytes in -tenant-limits and -tenant-default-limits. 0 uses the built-in default of 64 MiB |
-manual-range-metric-row-limit | int | 1000000 | extraArgs.manual-range-metric-row-limit | Maximum log rows fetched per manual range-metric compatibility call (rate, count_over_time, etc.). Lower values bound memory at the cost of result truncation for high-cardinality queries. |
-max-concurrent | int | 100 | extraArgs.max-concurrent | Maximum concurrent requests allowed through the proxy (0 disables) |
-max-entries-limit-per-query | int | 10000 | extraArgs.max-entries-limit-per-query | Loki's max_entries_limit_per_query: a log query asking for more lines fails with Loki's 400 (see -max-entries-limit-per-query-cap); label values requests above it are capped. Per tenant through -tenant-limits and -tenant-default-limits. 0 uses the built-in default of 10000 |
-max-entries-limit-per-query-cap | bool | false | extraArgs.max-entries-limit-per-query-cap | Lower a log query limit above max_entries_limit_per_query to that value instead of rejecting it with Loki's 400 (the proxy's behaviour before 1.93; Loki rejects) |
-max-lines | int | 100 | extraArgs.max-lines | Entries of a log query (query_range) that sends no limit; Loki's default is 100 |
-max-metadata-cache-freshness | duration | 24h0m0s | extraArgs.max-metadata-cache-freshness | Loki max_metadata_cache_freshness, applied to all tenants: a /labels, /label/{name}/values or /series request that ends within this window of now does not reuse a cached answer older than -recent-tail-refresh-max-staleness, so streams written in the window appear like in Loki. Sealed inventory buckets come from the cache; the newest minute, buckets due for revalidation and a row count over each run of counted buckets (every empty bucket, and hour and day buckets that ended an hour ago; stream and field filters only; cheap for * and stream filters, but with a field filter it reads the filtered column of every row in the run's range; reused for -recent-tail-refresh-max-staleness) are read live, and a bucket whose rows changed is rescanned, so rows backfilled into a cached bucket appear on the next request. A non-empty 5m or 1m bucket (no row count) and a bucket with rows from the last hour follow the normal schedule. 0 keeps the previous caching for every range. |
-max-query-ast-nodes | int | 0 | extraArgs.max-query-ast-nodes | Maximum number of nodes a parsed LogQL query may have: every expression node, pipeline stage and stream selector matcher. A longer query is refused, after it has been parsed and ahead of the response cache, with HTTP 400 query too complex: too many nodes; the request log line names this flag and the numbers. Loki has no such limit below its input size limit. 0 derives the limit from -max-query-length-bytes: a query never has more nodes than bytes, so the default refuses nothing the length limit accepts; set a lower value to refuse complex queries |
-max-query-length-bytes | int | 131072 | extraArgs.max-query-length-bytes | Maximum LogQL query string length in bytes. The default matches Loki's syntax.maxInputSize (131072), so the proxy rejects only what Loki rejects; lower it to reject long queries earlier. 0 uses the built-in default |
-max-query-nesting-depth | int | 0 | extraArgs.max-query-nesting-depth | Maximum nesting depth of a parsed LogQL query: the longest chain of nested expressions (parentheses add none). A deeper query is refused, after it has been parsed and ahead of the response cache, with HTTP 400 query too complex: nesting too deep; the request log line names this flag and the numbers. Loki has no such limit below its input size limit. 0 derives the limit from -max-query-length-bytes, so the default refuses nothing the length limit accepts; set a lower value to refuse deeply nested queries |
-max-query-plan-time | duration | 10s | extraArgs.max-query-plan-time | Budget for the proxy's own work on a request before it asks VictoriaLogs: the validation misses of its query and its translation, not admission waits, cache reads or VictoriaLogs calls. It is checked while the query is validated (the parser and its semantic pass, every 256 tokens or nodes after the first 1,024: a syntax error is still answered with Loki's error, the checks over the tree stop; the walk of the tree checks, every 256 nodes), after the validation, at every node of the lowering, right after the string translator returns and before the first VictoriaLogs call. A request over it is refused with HTTP 400 query planning took longer than the limit; the request log line names this flag. 0 turns the budget off |
-max-stats-cache-freshness | duration | 10m0s | extraArgs.max-stats-cache-freshness | Loki max_stats_cache_freshness, applied to all tenants. An instant /index/volume over at least 10 minutes is summed from UTC-aligned day, hour, 5-minute and minute segments kept in the read cache (memory, disk and peers), so a window moved by seconds reads only its edges from VictoriaLogs; segments that end within this window of now are read from VictoriaLogs on every request, like Loki, which does not cache a volume ending within it. 0 caches every segment but the newest minute. -metadata-inventory-parallelism=0 turns the segments off. |
-max-stats-query-series | int | 0 | extraArgs.max-stats-query-series | Maximum number of series returned by stats metric queries (count_over_time, rate, bytes_rate). 0 = built-in default of 1000, above Loki's own max_query_series default of 500 because the proxy answers faster than Loki; set 500 to match Loki. Above it a plain client gets Loki's HTTP 400 and Logs Drilldown gets a partial result with Loki's warning (-drilldown-series-limit-mode). High-cardinality fields (trace_id, *_id, churn-heavy pod naming), where each value appears only 1-2× in the window, are what the cap bounds. Raise -backend-max-buffered-response-bytes with a higher cap. Per tenant as max_query_series in -tenant-limits and -tenant-default-limits. |
-max-zero-fill-buckets | int | 32768 | extraArgs.max-zero-fill-buckets | Maximum buckets the proxy zero-fills in a metric response. 0 uses the built-in default of 32768 |
-metadata-inventory-parallelism | int | 4 | extraArgs.metadata-inventory-parallelism | Label names and values (/labels, /label/{name}/values, detected field names) are listed from a time-bucketed inventory: day, hour, 5-minute and minute buckets cached in the read cache (memory, disk and peers) and merged, so a window moved by seconds reads only its edges from VictoriaLogs. This is how many bucket listings one request may have in flight, and how many segment reads an instant /index/volume may have in flight (-max-stats-cache-freshness). 0 turns the inventory and the volume segments off, making every listing and volume one VictoriaLogs call over the whole range |
-multi-tenant-max-fanout | int | 64 | extraArgs.multi-tenant-max-fanout | Maximum tenants one multi-tenant request may fan out to; more returns HTTP 400 naming this flag. 0 uses the built-in default of 64 |
-multi-tenant-max-merged-response-bytes | int | 33554432 | extraArgs.multi-tenant-max-merged-response-bytes | Maximum bytes of a merged multi-tenant response; more returns HTTP 413 naming this flag. 0 uses the built-in default of 32 MiB |
-ordered-json-metric-max-bytes | int64 | 1073741824 | extraArgs.ordered-json-metric-max-bytes | Safety cap on the VictoriaLogs raw rows response read, and the response built, by the proxy-side ordered JSON metric evaluator (0 = default 1 GiB, no upper bound). Exceeding it rejects the query instead of returning partial results. Grafana logs volume shapes are computed from VictoriaLogs stats buckets and do not read raw rows. |
-patterns-max-backend-rows | int | 20000 | extraArgs.patterns-max-backend-rows | Maximum log lines /patterns reads from VictoriaLogs for one request. 0 uses the built-in default of 20000 |
-patterns-max-counts-rows | int | 250000 | extraArgs.patterns-max-counts-rows | Maximum rows (distinct step, level and collapsed message groups) the /patterns counts query may return; past it the request samples lines instead. 0 uses the built-in default of 250000 |
-patterns-second-pass-max-rows | int | 8000 | extraArgs.patterns-second-pass-max-rows | Maximum log lines the /patterns second pass reads when the first pass mined too few patterns. 0 uses the built-in default of 8000 |
-patterns-second-pass-max-windows | int | 8 | extraArgs.patterns-second-pass-max-windows | Maximum windows the /patterns second pass re-reads. 0 uses the built-in default of 8 |
-rate-limit-burst | int | 100 | extraArgs.rate-limit-burst | Per-client burst size for request rate limiting (0 disables burst bucket) |
-rate-limit-per-second | float64 | 50 | extraArgs.rate-limit-per-second | Per-client request rate limit in requests per second (0 disables) |
-stats-query-range-concurrency | int | 0 | extraArgs.stats-query-range-concurrency | Maximum concurrent stats_query_range calls to VictoriaLogs. Drilldown Fields fires ~30 in parallel; capping prevents CPU storms. 0 = built-in default of 4. |
-stats-query-range-inter-query-delay-ms | int | 200 | extraArgs.stats-query-range-inter-query-delay-ms | minimum pause in ms between consecutive individual VL stats_query_range calls: the semaphore slot is held for this duration after each call completes, spreading the drilldown burst over time and reducing VL CPU spikes (0 disables) |
observability​
| Flag | Type | Default | Helm value | Description |
|---|---|---|---|---|
-debug-vl-calls-header | bool | false | extraArgs.debug-vl-calls-header | When true, every Loki read response carries X-Loki-VL-Backend-Calls, the VictoriaLogs calls the request started before its response headers were written (a lower bound for a streamed answer; background work is not counted), and X-Loki-VL-Cache-Result, the response cache result (hit, miss, or bypass when none was consulted), so a cache reuse check can attribute VictoriaLogs calls to one request. Default false: Loki sends neither header, and the count describes backend work. |
-deployment-environment | string | (empty) | extraArgs.deployment-environment | OpenTelemetry deployment.environment.name for logs and OTLP metrics |
-host-proc-root | string | "/proc" | extraArgs.host-proc-root | Filesystem root for host-scope /proc reads (stat, meminfo, pressure/{cpu,memory,io}). Set to /host/proc when running with the chart's surgical hostPath mounts. Defaults to /proc. |
-log-buffered | bool | true | extraArgs.log-buffered | Write logs in the background to avoid slowing down requests under high load |
-log-level | string | "info" | extraArgs.log-level | Log level: debug, info, warn, error |
-log-rate-threshold | int | 10 | extraArgs.log-rate-threshold | When traffic exceeds this rate (req/s), replace per-request logs with periodic summaries. Errors are always logged. |
-log-request-sample-rate | int | 0 | extraArgs.log-request-sample-rate | Sample rate for per-request access logs on successful (2xx) responses. 0 or 1 logs every request. N>1 logs 1 in every N requests. 4xx/5xx are always logged. |
-log-stats-interval | duration | 10s | extraArgs.log-stats-interval | How often to print a request statistics summary (total, errors, latency, cache rate) |
-log-user-header | string | (empty) | extraArgs.log-user-header | Header naming the end user who ran a query (X-Grafana-User with Grafana's [dataproxy] send_user_header=true), logged as enduser.id on the request, upstream_request, slow_request and slow_upstream_request lines and shown in /debug/queries. Logs and the admin view only: never a metric label, never sent to VictoriaLogs, never part of a cache key. The header is client-sent and spoofable: restrict it with -log-user-header-trusted-cidrs. A header that carries credentials (Authorization, Cookie, or a name with token, secret, password, key, session or credential) is refused at startup. Empty: the user is the tenant (or the -metrics.trust-proxy-headers identity) |
-log-user-header-trusted-cidrs | string | (empty) | extraArgs.log-user-header-trusted-cidrs | Comma-separated CIDRs or addresses of the TCP peers (Grafana, or the load balancer in front of the proxy) allowed to name the user through -log-user-header; a request from any other peer is logged under its tenant. Matches the connection's address, never X-Forwarded-For. Empty trusts every peer |
-metrics-listen | string | (empty) | extraArgs.metrics-listen | Optional dedicated address for the /metrics endpoint. When empty AND --server.register-instrumentation=true, /metrics is served on --listen (back-compat). When non-empty AND --server.register-instrumentation=true, /metrics is served on this dedicated listener. |
-metrics.export-sensitive-labels | bool | false | extraArgs.metrics.export-sensitive-labels | Export per-tenant and per-client identity metrics on /metrics and OTLP |
-metrics.max-clients | int | 256 | extraArgs.metrics.max-clients | Maximum unique client labels retained in exported metrics before collapsing into overflow |
-metrics.max-tenants | int | 256 | extraArgs.metrics.max-tenants | Maximum unique tenant labels retained in exported metrics before collapsing into overflow |
-metrics.trust-proxy-headers | bool | false | extraArgs.metrics.trust-proxy-headers | Trust X-Grafana-User and X-Forwarded-For when deriving per-client metrics labels |
-otel-service-instance-id | string | (empty) | extraArgs.otel-service-instance-id | OpenTelemetry service.instance.id for logs and OTLP metrics |
-otel-service-name | string | "loki-vl-proxy" | extraArgs.otel-service-name | OpenTelemetry service.name for logs and OTLP metrics |
-otel-service-namespace | string | (empty) | extraArgs.otel-service-namespace | OpenTelemetry service.namespace for logs and OTLP metrics |
-otlp-compression | string | "none" | extraArgs.otlp-compression | OTLP compression: none, gzip, zstd |
-otlp-endpoint | string | (empty) | extraArgs.otlp-endpoint | OTLP HTTP endpoint (e.g., http://otel-collector:4318/v1/metrics) |
-otlp-headers | string | (empty) | extraArgs.otlp-headers | Comma-separated OTLP HTTP headers in key=value form |
-otlp-interval | duration | 30s | extraArgs.otlp-interval | OTLP push interval |
-otlp-timeout | duration | 10s | extraArgs.otlp-timeout | OTLP HTTP request timeout |
-otlp-tls-skip-verify | bool | false | extraArgs.otlp-tls-skip-verify | Skip TLS verification for OTLP endpoint |
-proc-root | string | "/proc" | extraArgs.proc-root | Filesystem root for self/container-scope /proc reads (self/status, self/io, self/stat, self/fd, net/dev). Back-compat: if --host-proc-root is left at its default, this value also seeds the host-scope root. |
-slow-query-log-level | string | "warn" | extraArgs.slow-query-log-level | Level the slow_request and slow_upstream_request lines are logged at: warn, info or debug (logged only when the logger level lets them through), or off: no slow lines and no per-request trace; loki_vl_proxy_slow_requests_total still counts slow requests |
-slow-query-log-raw-queries | bool | true | extraArgs.slow-query-log-raw-queries | Slow lines carry the LogQL and LogsQL text (capped at 8 KB each); false carries their sha256 and length instead, as debug logs do without -debug-log-raw-queries |
-slow-query-threshold | duration | 3s | extraArgs.slow-query-threshold | A client request taking at least this long is slow: counted in loki_vl_proxy_slow_requests_total{system="loki"} and logged at WARN (slow_request, whatever the request-log sampling) with its LogQL and its steps: every VictoriaLogs call with its LogsQL, window, status, bytes and time, every proxy-side operation and route decision, every rewrite of the LogQL, each with its offset from the request's start. Live tail is exempt. 0 turns it off |
-slow-upstream-threshold | duration | 2s | extraArgs.slow-upstream-threshold | One VictoriaLogs call taking at least this long to the end of its body is slow: counted in loki_vl_proxy_slow_requests_total{system="vl"} and logged at WARN (slow_upstream_request) with its LogsQL, window, bytes and the client route it served. 0 turns it off |
-translate-shadow-sample | float64 | 0 | extraArgs.translate-shadow-sample | Share (0-1) of the queries the string translator translates (cache misses) that the typed query-plan lowering also translates, in the background, to compare the two translations: counted in loki_vl_proxy_lowering_shadow_total by result and construct, a mismatch logged (the query redacted), at most 1 line per second. At most 2 comparisons run at once, each within 100 ms; the answer, the caches and the VictoriaLogs requests are never affected. 0 turns it off |
peer cache​
| Flag | Type | Default | Helm value | Description |
|---|---|---|---|---|
-peer-auth-token | string | (empty) | extraArgs.peer-auth-token | Shared token required on /_cache/get and /_cache/set peer-cache requests when set |
-peer-discovery | string | (empty) | peerCache.* (chart-managed) | dns |
-peer-dns | string | (empty) | peerCache.* (chart-managed) | dns |
-peer-hot-read-ahead-enabled | bool | false | extraArgs.peer-hot-read-ahead-enabled | Enable bounded hot read-ahead from peer hot index to prewarm local shadows |
-peer-hot-read-ahead-error-backoff | duration | 15s | extraArgs.peer-hot-read-ahead-error-backoff | Base read-ahead cooldown applied after peer/index errors |
-peer-hot-read-ahead-interval | duration | 30s | extraArgs.peer-hot-read-ahead-interval | Base interval for periodic peer hot read-ahead pulls |
-peer-hot-read-ahead-jitter | duration | 5s | extraArgs.peer-hot-read-ahead-jitter | Random jitter added to peer hot read-ahead interval |
-peer-hot-read-ahead-max-bytes-per-interval | int64 | 8388608 | extraArgs.peer-hot-read-ahead-max-bytes-per-interval | Maximum bytes prefetched per interval |
-peer-hot-read-ahead-max-concurrency | int | 4 | extraArgs.peer-hot-read-ahead-max-concurrency | Maximum concurrent hot-index and prefetch peer operations |
-peer-hot-read-ahead-max-keys-per-interval | int | 64 | extraArgs.peer-hot-read-ahead-max-keys-per-interval | Maximum number of hot keys prefetched per interval |
-peer-hot-read-ahead-max-object-bytes | int | 262144 | extraArgs.peer-hot-read-ahead-max-object-bytes | Maximum object size eligible for hot read-ahead |
-peer-hot-read-ahead-min-ttl | duration | 30s | extraArgs.peer-hot-read-ahead-min-ttl | Minimum remaining TTL required for hot read-ahead candidates |
-peer-hot-read-ahead-tenant-fair-share | int | 50 | extraArgs.peer-hot-read-ahead-tenant-fair-share | Maximum per-tenant share (percent) of key budget in fairness pass |
-peer-hot-read-ahead-top-n | int | 256 | extraArgs.peer-hot-read-ahead-top-n | Number of top hot keys requested from each peer hot index |
-peer-http-url | string | (empty) | peerCache.* (chart-managed) | http |
-peer-insecure-ip-allowlist | bool | false | extraArgs.peer-insecure-ip-allowlist | When true, allow peer cache requests based on source IP membership alone (legacy behavior). Default false: a shared --peer-auth-token is required when peer discovery is configured. |
-peer-push-buffer-max-bytes | int64 | 33554432 | extraArgs.peer-push-buffer-max-bytes | Bytes of the values in the peer push buffer (-peer-push-buffer-max-entries), across all peers. 0 turns buffering off. |
-peer-push-buffer-max-entries | int | 8192 | extraArgs.peer-push-buffer-max-entries | Pushes to replicas kept per proxy, across all peers, while a peer cannot take them (its breaker is open, it is still starting, the push queue is full or the push failed); they are replayed once the peer answers, slowly first, the newest value per key. Above the bound the oldest push of the largest backlog is dropped and counted. 0 turns buffering off: such pushes are dropped. |
-peer-read-hedge-max-delay | duration | 200ms | extraArgs.peer-read-hedge-max-delay | Longest a peer-cache read waits on one replica's response headers before it also asks the key's next replica or, with none left, goes on as a miss (VictoriaLogs or a local compute) while that call finishes in the background, where its -peer-timeout still suspends a paused peer. The delay used is twice the p99 of the measured peer header latencies, at least 5ms and at most this value and half of -peer-timeout. 0 turns hedging off: a read waits up to -peer-timeout on each replica. |
-peer-replication-factor | int | 2 | extraArgs.peer-replication-factor | Replicas of every peer-cache key, owner included: the key's owner on the peer ring and the next distinct peers clockwise (1-5). Write-through writes are pushed to every replica, which keeps the copy in memory and on disk and never pushes it on; a lookup that misses memory and disk asks the replicas in ring order, so a replica that lost its disk, or whose owner is down, gets the key from another replica instead of recomputing it. Each extra replica adds one push per write-through write and the copies' memory and disk on the peers. 1 keeps one copy on the owner. |
-peer-self | string | (empty) | peerCache.* (chart-managed) | 10.0.0.1:3100 |
-peer-self-az | string | (empty) | extraArgs.peer-self-az | us-east-1a |
-peer-srv | string | (empty) | peerCache.* (chart-managed) | srv |
-peer-static | string | (empty) | peerCache.* (chart-managed) | static |
-peer-timeout | duration | 2s | extraArgs.peer-timeout | Timeout for peer-cache fetch requests to owner peers |
-peer-write-through | bool | true | extraArgs.peer-write-through | Push cache writes from non-owner peers to owner peers for warmer distributed cache under skewed traffic |
-peer-write-through-min-ttl | duration | 30s | extraArgs.peer-write-through-min-ttl | Minimum TTL eligible for peer owner write-through pushes. Empty label and label-value answers are cached for max(30s, this, -disk-cache-min-ttl) so they replace older non-empty copies |
security​
| Flag | Type | Default | Helm value | Description |
|---|---|---|---|---|
-cb-fail-threshold | int | 5 | extraArgs.cb-fail-threshold | Circuit breaker: failures within -cb-window-duration before opening |
-cb-open-duration | duration | 10s | extraArgs.cb-open-duration | Circuit breaker: how long to stay open before allowing probe requests |
-cb-window-duration | duration | 30s | extraArgs.cb-window-duration | Circuit breaker: sliding window for failure counting; failures older than this are discarded |
-coalescer-disabled | bool | false | extraArgs.coalescer-disabled | Disable request coalescing (singleflight); every concurrent request makes its own backend call — useful with -cache-disabled to measure raw translation overhead. It also turns off the request-level join: identical read requests in flight then run each on their own (held failures are still answered, see -error-cache-enabled) |
-debug-log-raw-queries | bool | false | extraArgs.debug-log-raw-queries | When true, debug logs include raw LogQL/LogsQL and backend params verbatim. Default false (redacted to sha256+len). |
-delete-api-auth-token | string | (empty) | extraArgs.delete-api-auth-token | Token every /loki/api/v1/delete request must carry, in X-Delete-Token or Authorization: Bearer (constant-time compare); required by -delete-api-enabled. It is the delete API's own credential: the admin token and the admin listener are unaffected. Prefer the Helm value deleteAuth.existingSecret, which keeps it out of the pod spec |
-delete-api-enabled | bool | false | extraArgs.delete-api-enabled | Register /loki/api/v1/delete and run Loki's delete requests as VictoriaLogs delete tasks (VictoriaLogs needs -delete.enable). Requires -delete-api-auth-token: every delete request must carry it in X-Delete-Token or Authorization: Bearer, and the proxy refuses to start without one. When false, the path answers 404 like Loki with deletion disabled (the default when compactor retention is off) |
-forward-authorization | bool | false | extraArgs.forward-authorization | Forward Authorization header to VL backend (equivalent to including Authorization in -forward-headers) |
-forward-cookies | string | (empty) | extraArgs.forward-cookies | Comma-separated list of cookie names to forward to VL backend |
-forward-headers | string | (empty) | extraArgs.forward-headers | Comma-separated list of HTTP headers to forward to VL backend |
-server.admin-auth-token | string | (empty) | extraArgs.server.admin-auth-token | Bearer token required for admin/debug endpoints when set |
-server.enable-pprof | bool | false | extraArgs.server.enable-pprof | Expose /debug/pprof/* handlers |
-server.enable-query-analytics | bool | false | extraArgs.server.enable-query-analytics | Expose /debug/queries query analytics |
-server.metrics-max-concurrency | int | 1 | extraArgs.server.metrics-max-concurrency | Maximum concurrent /metrics scrapes served at once (0 disables the cap) |
-server.register-instrumentation | bool | false | extraArgs.server.register-instrumentation | Register instrumentation handlers such as /metrics. Default false (BREAKING in v1.56.0; was true). Set true and optionally pair with --metrics-listen for a dedicated scrape port. The Helm chart sets this to true automatically so ServiceMonitor scrapes keep working without operator action. |
-tls-cert-file | string | (empty) | extraArgs.tls-cert-file | TLS certificate file for HTTPS server |
-tls-client-ca-file | string | (empty) | extraArgs.tls-client-ca-file | CA certificate file used to verify HTTPS client certificates |
-tls-key-file | string | (empty) | extraArgs.tls-key-file | TLS private key file for HTTPS server |
-tls-require-client-cert | bool | false | extraArgs.tls-require-client-cert | Require and verify HTTPS client certificates |
server​
| Flag | Type | Default | Helm value | Description |
|---|---|---|---|---|
-admin-listen | string | "127.0.0.1:3101" | extraArgs.admin-listen | Address for admin/debug endpoints (/admin/, /debug/) when --server.admin-auth-token is empty. Loopback by default so the binary boots safely with no flags. Ignored when --server.admin-auth-token is set — admin endpoints then ride the main --listen address. |
-alerts-backend | string | (empty) | extraArgs.alerts-backend | Optional alert backend URL for /alerts passthrough (defaults to -ruler-backend when unset); a path is kept as a prefix |
-backend | string | "http://localhost:9428" | extraArgs.backend | VictoriaLogs backend URL; a path is kept as a prefix of every request (for example https://o11y.example.com/logs behind a reverse proxy) |
-backend-basic-auth | string | (empty) | extraArgs.backend-basic-auth | Basic auth for VL backend (user:password) |
-backend-compression | string | "auto" | extraArgs.backend-compression | Backend HTTP compression preference: auto, gzip, zstd, none |
-backend-default-msg-value | string | (empty) | extraArgs.backend-default-msg-value | VictoriaLogs -defaultMsgValue when it is customized. Rows whose _msg is empty, starts with VictoriaLogs' default "missing _msg field" text, or equals this value get their log line rebuilt as a JSON object of the row's non-stream fields |
-backend-retry-attempts | int | 2 | extraArgs.backend-retry-attempts | How many times a VictoriaLogs read that fails for a reason a retry can fix is sent again before the client gets an error: a connection refused or reset, or closed before any answer, and a 429, 502, 503 or 504 answer (a full select queue, a node restarting, a proxy in front that lost its backend). The wait doubles from 200 ms to 2 s with jitter and honours Retry-After; nothing is repeated once an answer body was read, after a timeout, a client cancel, with the circuit breaker not closed, or past the request deadline. The error a client gets after the last try is the one it gets without retries. 0 sends every read once |
-backend-retry-budget-ratio | float64 | 0.1 | extraArgs.backend-retry-budget-ratio | Retries a replica earns per VictoriaLogs call, so a sustained failure is retried for at most that fraction of the calls (plus a burst of 20 for a quiet replica) and retries cannot multiply the load on an overloaded VictoriaLogs. Must be between 0 and 1; 0 leaves only the burst |
-backend-retry-max-wait | duration | 5s | extraArgs.backend-retry-max-wait | The longest one VictoriaLogs call waits, in total, between its tries (-backend-retry-attempts); a try that would not fit, or a Retry-After beyond it, ends the retries and returns the last answer. 0 disables retries |
-backend-tls-skip-verify | bool | false | extraArgs.backend-tls-skip-verify | Skip TLS verification for VL backend |
-go-gc-percent | int | 200 | extraArgs.go-gc-percent | GOGC target percentage. Higher values reduce GC frequency at the cost of higher peak RSS. Set to -1 to use Go runtime default (100). Ignored when GOGC env var is already set. |
-go-mem-limit | int64 | 0 | extraArgs.go-mem-limit | Explicit GOMEMLIMIT in bytes. Overrides -go-mem-limit-percent. 0 = use percentage or GOMEMLIMIT env var. |
-go-mem-limit-percent | int | 85 | extraArgs.go-mem-limit-percent | Percentage of the detected container memory limit (cgroups) to set as GOMEMLIMIT. 0 disables auto-detection. Ignored when GOMEMLIMIT env var or -go-mem-limit is set. |
-listen | string | ":3100" | extraArgs.listen | Address to listen on (Loki-compatible frontend) |
-response-compression | string | (empty) | extraArgs.response-compression | Response compression codec: auto, gzip, none (default: auto) |
-response-compression-min-bytes | int | defaultResponseCompressionMinBytes | extraArgs.response-compression-min-bytes | Minimum response size before frontend compression starts (0 compresses any size) |
-response-gzip | bool | true | extraArgs.response-gzip | Deprecated: enable compressed responses for clients that accept them; prefer -response-compression |
-ruler-backend | string | (empty) | extraArgs.ruler-backend | Optional alert/ruler backend URL for /rules passthrough (for example vmalert); a path is kept as a prefix |
-stream-response | bool | false | extraArgs.stream-response | Stream log responses via chunked transfer encoding |
-warmup-max-jitter | duration | 0 | extraArgs.warmup-max-jitter | Maximum random delay before label cache warmup starts. Spread this across a fleet (e.g. 10s for ≥3 instances) to prevent all proxies hammering VL simultaneously on restart. |
tenancy​
| Flag | Type | Default | Helm value | Description |
|---|---|---|---|---|
-auth.enabled | bool | false | extraArgs.auth.enabled | Require X-Scope-OrgID on query requests. When false, requests without a tenant header use the backend default tenant. With tenancy turned off (-tenant.numeric-passthrough=false and no -auth.enabled, -require-tenant-header, -tenant-map, -tenant-map-file or -tenant-label) the header is ignored and every request reads the backend default tenant, as in Loki's single-tenant mode (auth_enabled: false). |
-forward-tenant-header | bool | true | extraArgs.forward-tenant-header | Forward the per-tenant X-Scope-OrgID header to the upstream backend. Safe for VictoriaLogs (ignores it). Required for Victoria Lakehouse native tenant routing. |
-require-tenant-header | bool | false | extraArgs.require-tenant-header | Reject requests missing X-Scope-OrgID with HTTP 401. Independent of -auth.enabled; use when you want tenant enforcement without full auth. |
-tenant-default-limits | string | (empty) | extraArgs.tenant-default-limits | query_timeout |
-tenant-label | string | (empty) | extraArgs.tenant-label | VL field name for label-based tenant routing. When set, X-Scope-OrgID values are injected as {<tenant-label>="<orgID>"} into VL queries instead of AccountID/ProjectID headers. Use when all data is under VL default tenant (0:0). Explicit -tenant-map entries take priority. The default aliases 0, fake and default and an empty org carry no tenant to filter on, so in this mode they are refused with 403 like "*" unless -tenant.allow-global is set; a tenant-map entry for an alias admits it, but no entry admits an empty org. Env: TENANT_LABEL |
-tenant-limits | string | (empty) | extraArgs.tenant-limits | otlp-endpoint |
-tenant-limits-allow-publish | string | (empty) | extraArgs.tenant-limits-allow-publish | Comma-separated limit fields published on /config/tenant/v1/limits and /loki/api/v1/drilldown-limits |
-tenant-map | string | (empty) | extraArgs.tenant-map | org-name |
-tenant-map-file | string | (empty) | extraArgs.tenant-map-file | Path to YAML or JSON file containing the tenant map. Hot-reloaded on SIGHUP and automatically when the file changes (see -tenant-map-reload-interval). Supports Kubernetes ConfigMap volumes. |
-tenant-map-reload-interval | duration | 30s | extraArgs.tenant-map-reload-interval | How often to poll -tenant-map-file for mtime changes. Set to 0 to disable polling. |
-tenant.allow-global | bool | false | extraArgs.tenant.allow-global | Allow X-Scope-OrgID "*" to bypass AccountID/ProjectID scoping and use the backend default tenant. With -tenant-label or with -tenant.numeric-passthrough=false it also admits the default aliases 0, fake and default and a missing org without a tenant filter or tenant map entry |
-tenant.numeric-passthrough | bool | false | extraArgs.tenant.numeric-passthrough | Route an X-Scope-OrgID that is a canonical decimal number (digits only, no sign, no leading zeros, at most 4294967295) to the VictoriaLogs account of that number. A number spelled any other way (007, 00, +7, -1) or above 4294967295 is refused with 403 unknown tenant unless -tenant-map lists it exactly, because Loki keeps 007 and 7 as different tenants. Tenancy is off by default: with this flag unset and none of -auth.enabled, -require-tenant-header, -tenant-map, -tenant-map-file or -tenant-label (or their TENANT_MAP, TENANT_MAP_FILE, TENANT_LABEL environment forms), X-Scope-OrgID is ignored and every request reads the backend default tenant, as in Loki's single-tenant mode (auth_enabled: false). Set true to route numeric org IDs with no other tenant setting. Left unset next to another tenant setting, it stays on as before. Set false explicitly for strict routing: only orgs listed in -tenant-map are routed and every other numeric org gets 403; the default aliases 0, fake and default and a missing X-Scope-OrgID are then refused like the wildcard unless -tenant.allow-global is set or the tenant map lists them (no entry admits a missing org). Has no effect with -tenant-label |
timeouts​
| Flag | Type | Default | Helm value | Description |
|---|---|---|---|---|
-backend-timeout | duration | 2m0s | extraArgs.backend-timeout | Timeout for non-streaming requests to the VictoriaLogs backend. The remaining budget is also passed to VictoriaLogs as its per-query timeout argument, so VictoriaLogs stops work the proxy has given up on |
-backend-version-check-timeout | duration | 5s | extraArgs.backend-version-check-timeout | Timeout for startup backend version compatibility check |
-drilldown-scan-timeout | duration | 5s | extraArgs.drilldown-scan-timeout | Per-request timeout for the detected_fields / detected_field_values log scan path. Caps the time a single Drilldown panel can spend scanning logs with a parser filter. 0 disables the cap (use VL's natural response time). |
-http-idle-timeout | duration | 2m0s | extraArgs.http-idle-timeout | HTTP server idle timeout |
-http-read-header-timeout | duration | 10s | extraArgs.http-read-header-timeout | HTTP server read header timeout |
-http-read-timeout | duration | 30s | extraArgs.http-read-timeout | HTTP server read timeout |
-http-write-timeout | duration | 2m0s | extraArgs.http-write-timeout | HTTP server write timeout |
-query-range-window-timeout | duration | 20s | extraArgs.query-range-window-timeout | Per-window backend timeout budget for query_range window fetches (0 disables) |