Skip to content
Install the CLI

Reference experimental

loki

These docs describe Kix's main branch, which can include changes not yet released. Read the docs for the latest release.

Grafana Loki log store, single binary on one volume

This page is generated from kix/packages/experimental/loki.

StabilityExperimental
package valuepackages.experimental.loki
Default software version3.7.10
Default aliasesloki
Highest availability levelnone

Kix matches each dependency below to another package instance by instance name, alias, or role. To bind a specific instance, set deps.<name> in your cluster definition. See Declaring dependencies for how required and optional dependencies work.

DependencyRequirement
storageRequired
prometheusOptional

Extra environment variables. A value is a string, a fieldRef source such as { valueFrom.fieldRef.fieldPath = "metadata.name"; }, or a secretKeyRef source naming a Secret managed outside Kix with kix.untrackedRef. A credential that comes from a dependency is wired by the package. Null removes a variable the package sets by default.

  • Type: attribute set of (null or string or env var source with `valueFrom`)
  • Default: { }

Flags appended after the package’s own. Loki applies flags after its config file, so the flags that would override a locked settings path (-auth.enabled, -server.http-listen-port, -common.path-prefix, -common.storage.filesystem.*, -common.storage.ring.{instance-addr,store,replication-factor}), -config.file, -config.expand-env, and -target fail evaluation.

  • Type: list of string

  • Default: [ ]

  • Example:

    [
    "-log.format=json"
    ]

Run the package’s post-deploy probe (kix.healthCheck) once its resources are ready. A failing probe fails the deploy before the activation switches.

  • Type: boolean
  • Default: false

Seconds the probe keeps re-checking before it gives up, so a target still restarting from the rollout does not fail the deploy. The Job’s deadline is sized from it.

  • Type: signed integer
  • Default: 90

Container image for this instance. Set it from a pin file (kix.pins) so the deployed reference is committed and resolved.

  • Type: submodule

  • Default:

    {
    digest = "sha256:b43c257ccfc925d4a50b8717cac61a3b51df8c48d01847936057e5c4075a24a7";
    pullPolicy = "IfNotPresent";
    repository = "docker.io/grafana/loki";
    tag = "3.7.10";
    }

Resolved manifest digest, sha256: followed by 64 hex characters. What will actually run. Null means not resolved.

  • Type: null or string
  • Default: the package’s digest while tag is the package’s tag, otherwise null

Whatever a person wanted to say about this pin. Kix never reads it and a promotion never discards it. Declared here for the same reason as the three fields above: a pin carries its own record-keeping, and the option accepts the whole pin rather than a subset of it.

  • Type: null or string
  • Default: null

Who resolved this pin, for the record. Null when unknown.

  • Type: null or string
  • Default: null

imagePullPolicy for containers using this image. Null leaves it to Kubernetes.

  • Type: null or string
  • Default: "IfNotPresent"

Image repository, registry host included.

  • Type: string
  • Default: "docker.io/grafana/loki"

When this pin was resolved, RFC 3339. Null when unknown.

  • Type: null or string
  • Default: null

Revision of the source the image was built from, when Kix built it. Null for upstream images.

  • Type: null or string
  • Default: null

Image tag. What was asked for.

  • Type: string
  • Default: "3.7.10"

Enable metrics endpoint and monitoring resources (ServiceMonitor, PrometheusRules) when prometheus is available.

  • Type: boolean
  • Default: true

Scrape interval (e.g. ”30s”). Null = use Prometheus default.

  • Type: null or string
  • Default: null

How long Loki may go without a successful compaction, or with retention on, a successful retention run, before LokiCompactionStale or LokiRetentionStale fires, as a Prometheus duration. Null derives each rule’s threshold from the merged settings: twice compactor.compaction_interval (or compactor.apply_retention_interval for retention) plus one hour, and at least 3h, the Loki mixin’s threshold. At the default 10m interval both are 3h.

  • Type: null or string matching the pattern ([0-9]+(ms|s|m|h|d|w|y))+
  • Default: null
  • Example: "6h"

Requests per second a route must serve before LokiRequestErrors considers its error ratio, so a few failures on a rarely used route do not fire it.

  • Type: nonnegative integer or floating point number, meaning >=0
  • Default: 0.1
  • Example: 1

Share of a route’s HTTP requests that may answer 5xx before LokiRequestErrors fires. The default is the Loki mixin’s.

  • Type: integer or floating point number between 0 and 1 (both inclusive)
  • Default: 0.1
  • Example: 0.05

Container resource requests and limits. Each field keeps its default until set, and null removes a default.

  • Type: submodule

  • Default:

    {
    limits = {
    cpu = "1";
    memory = "1Gi";
    };
    requests = {
    cpu = "100m";
    memory = "256Mi";
    };
    }

Dynamic resource claims the container uses. Null leaves it unset.

  • Type: null or (list of (submodule))
  • Default: null

Name of an entry in the pod’s resourceClaims.

  • Type: string

Request within the claim to use. Null uses the whole claim.

  • Type: null or string
  • Default: null

Resource quantities by name.

  • Type: open submodule of attribute set of Kubernetes quantity, such as "500m" or "1Gi" (a non-negative decimal or integer with an optional suffix m, k, M, G, T, P, E, Ki, Mi, Gi, Ti, Pi or Ei)
  • Default: { }

The cpu quantity. Null leaves it unset.

  • Type: null or Kubernetes quantity, such as "500m" or "1Gi" (a non-negative decimal or integer with an optional suffix m, k, M, G, T, P, E, Ki, Mi, Gi, Ti, Pi or Ei)
  • Default: "1"

The ephemeral-storage quantity. Null leaves it unset.

  • Type: null or Kubernetes quantity, such as "500m" or "1Gi" (a non-negative decimal or integer with an optional suffix m, k, M, G, T, P, E, Ki, Mi, Gi, Ti, Pi or Ei)
  • Default: null

The memory quantity. Null leaves it unset.

  • Type: null or Kubernetes quantity, such as "500m" or "1Gi" (a non-negative decimal or integer with an optional suffix m, k, M, G, T, P, E, Ki, Mi, Gi, Ti, Pi or Ei)
  • Default: "1Gi"

Resource quantities by name.

  • Type: open submodule of attribute set of Kubernetes quantity, such as "500m" or "1Gi" (a non-negative decimal or integer with an optional suffix m, k, M, G, T, P, E, Ki, Mi, Gi, Ti, Pi or Ei)
  • Default: { }

The cpu quantity. Null leaves it unset.

  • Type: null or Kubernetes quantity, such as "500m" or "1Gi" (a non-negative decimal or integer with an optional suffix m, k, M, G, T, P, E, Ki, Mi, Gi, Ti, Pi or Ei)
  • Default: "100m"

The ephemeral-storage quantity. Null leaves it unset.

  • Type: null or Kubernetes quantity, such as "500m" or "1Gi" (a non-negative decimal or integer with an optional suffix m, k, M, G, T, P, E, Ki, Mi, Gi, Ti, Pi or Ei)
  • Default: null

The memory quantity. Null leaves it unset.

  • Type: null or Kubernetes quantity, such as "500m" or "1Gi" (a non-negative decimal or integer with an optional suffix m, k, M, G, T, P, E, Ki, Mi, Gi, Ti, Pi or Ei)
  • Default: "256Mi"

Loki configuration (config.yaml keys) merged over the package’s own. A null removes a key the package sets. A list replaces the package’s list whole, so a new schema_config.configs period restates the earlier ones. The package locks auth_enabled, server.http_listen_port, common.path_prefix, common.storage.filesystem, common.instance_addr, common.ring.kvstore, and common.replication_factor; setting one, or replacing a key above it, fails evaluation. A component’s own key (for example ingester.lifecycler.ring) takes precedence over its common default in Loki and is not locked.

Loki runs with -config.expand-env=true, so ${NAME} in a value reads the container’s env var NAME (set it through env); an unset variable becomes an empty string. Write $$ for a literal $.

  • Type: attribute set of anything

  • Default: { }

  • Example:

    {
    limits_config = {
    retention_period = "720h";
    };
    }