# Grafana Loki

Grafana Loki log\-search or analytics backend with documented integration and data\-management boundaries\.

ID: Q704 · Revision: 752

Type: software · License: AGPL\-3\.0[^lo-license] · Status: active

Website: https://grafana.com/docs/loki/latest/



Grafana Loki is a log\-aggregation and query system that indexes labels describing log streams rather than full\-text indexing every message\. It stores compressed log content and is commonly paired with a collector and Grafana for exploration\. Loki's AGPL3 backend is a distinct component from the agent that sends logs and the interface that displays them\.[^lo-readme][^lo-license]

## Index design affects workload fit

Loki is designed for comparatively few, long\-lived label combinations\. Unbounded labels such as transaction IDs or timestamps can create many short\-lived streams, a large index and small storage chunks, degrading performance\. The documentation recommends structured metadata for frequently searched high\-cardinality fields\. A migration from a full\-text index should therefore reconsider the data model rather than promote every field to a Loki label\.[^lo-labels]

## Retention requires deliberate configuration

Compactor\-based retention is disabled by default, so Loki does not automatically expire logs through that mechanism without configuration\. Object\-store lifecycle rules should be longer than Loki's retention period\. The guide also says changes to retention are not retroactive for already ingested logs\. Retention policy, storage deletion and existing data should therefore be considered separately\.[^lo-retain]

## Collector lifecycle

Current project guidance uses Grafana Alloy to collect and send logs\. Promtail reached end of life on March 2, 2026, with support and future development moving elsewhere; the notice explicitly excludes lambda\-promtail\. Existing tutorials that build a new stack around ordinary Promtail are consequently not sufficient evidence of a currently maintained collection path\.[^lo-promtail][^lo-readme]

## The logging stack includes more than the backend

The repository describes separate collector, Loki and Grafana roles\. Keeping the backend operational does not by itself guarantee that logs are still arriving or that existing dashboards and alerts use the correct queries\. A replacement plan should preserve collection configuration and visualization requirements alongside storage, rather than treating a backend switch as a complete stack migration\.[^lo-readme]

## Substitution considerations

Loki can replace Elasticsearch for selected operational log\-aggregation and investigation workloads when label\-oriented indexing fits the data\. It does not replace Elasticsearch's entire document\-search role or establish query\-language compatibility\. Label cardinality, retention behavior and the collection pipeline are central to that narrower assessment\.[^lo-readme][^lo-labels][^es-home]

## Capabilities and substitutions

### Label\-indexed log aggregation — supported

Indexes stream labels rather than full\-text message contents\.[^lo-readme]

Use case: Log search and analytics · Platforms: Self\-hosted server, Web · Region: Version, deployment, license and pipeline requirements apply

### High\-cardinality index labels — limited

Many unique label values can degrade performance; structured metadata is recommended for such fields\.[^lo-labels]

Use case: Log search and analytics · Platforms: Self\-hosted server, Web · Region: Version, deployment, license and pipeline requirements apply

### Substitute for elasticsearch (catalog entry pending) — limited

Can cover label\-oriented log investigation; not general document\-search or query equivalence\.[^lo-readme][^lo-labels][^es-home]

Use case: Operational log aggregation · Platforms: Self\-hosted server, Web · Region: Version, deployment, license and pipeline requirements apply

## References

[^lo-license]: [Grafana Loki license](<https://github.com/grafana/loki/blob/main/LICENSE>) — GNU Affero General Public License version 3 header (vendor; retrieved 2026-10-07T01:54:05Z)

[^lo-readme]: [Grafana Loki README](<https://github.com/grafana/loki/blob/main/README.md>) — Logging architecture: label indexing, Alloy collection and Grafana visualization (vendor; retrieved 2026-10-07T01:53:53Z)

[^lo-labels]: [Loki cardinality](<https://grafana.com/docs/loki/latest/get-started/labels/cardinality/>) — Impact of high\-cardinality labels and use of structured metadata (vendor; retrieved 2026-10-07T01:54:26Z)

[^lo-retain]: [Loki log retention](<https://grafana.com/docs/loki/latest/operations/storage/retention/>) — Compactor retention defaults, object\-store lifecycle alignment and non\-retroactive changes (vendor; retrieved 2026-10-07T01:54:05Z)

[^lo-promtail]: [Promtail lifecycle](<https://grafana.com/docs/loki/latest/send-data/promtail/>) — Promtail end of life on March 2, 2026; lambda\-promtail exclusion (vendor; retrieved 2026-10-07T01:54:47Z)

[^es-home]: [Elasticsearch overview](<https://www.elastic.co/elasticsearch>) — Product overview: distributed search, analytics and deployment choices (vendor; retrieved 2026-10-07T01:54:37Z)

Source revision: https://substitutefor.net/entities/Q704?revision=752
