{"schemaVersion":"1.0","record":{"label":"Grafana Loki","description":"Grafana Loki log-search or analytics backend with documented integration and data-management boundaries.","aliases":["Loki"],"kind":"software","website":"https://grafana.com/docs/loki/latest/","overview":"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.","license":"AGPL-3.0","lifecycle":"active","example":false,"features":[{"name":"Label-indexed log aggregation","status":"supported","detail":"Indexes stream labels rather than full-text message contents.","useCase":"Log search and analytics","platforms":["Self-hosted server","Web"],"region":"Version, deployment, license and pipeline requirements apply","evidence":[{"url":"https://github.com/grafana/loki/blob/main/README.md","locator":"Logging architecture: label indexing, Alloy collection and Grafana visualization","retrievedAt":"2026-10-07T01:53:53Z","kind":"vendor"}]},{"name":"High-cardinality index labels","status":"limited","detail":"Many unique label values can degrade performance; structured metadata is recommended for such fields.","useCase":"Log search and analytics","platforms":["Self-hosted server","Web"],"region":"Version, deployment, license and pipeline requirements apply","evidence":[{"url":"https://grafana.com/docs/loki/latest/get-started/labels/cardinality/","locator":"Impact of high-cardinality labels and use of structured metadata","retrievedAt":"2026-10-07T01:54:26Z","kind":"vendor"}]}],"alternatives":[],"slug":"grafana-loki","draftAlternatives":[{"targetSlug":"elasticsearch","status":"limited","detail":"Can cover label-oriented log investigation; not general document-search or query equivalence.","useCase":"Operational log aggregation","platforms":["Self-hosted server","Web"],"region":"Version, deployment, license and pipeline requirements apply","evidence":[{"url":"https://github.com/grafana/loki/blob/main/README.md","locator":"Logging architecture: label indexing, Alloy collection and Grafana visualization","retrievedAt":"2026-10-07T01:53:53Z","kind":"vendor"},{"url":"https://grafana.com/docs/loki/latest/get-started/labels/cardinality/","locator":"Impact of high-cardinality labels and use of structured metadata","retrievedAt":"2026-10-07T01:54:26Z","kind":"vendor"},{"url":"https://www.elastic.co/elasticsearch","locator":"Product overview: distributed search, analytics and deployment choices","retrievedAt":"2026-10-07T01:54:37Z","kind":"vendor"}]}],"evidence":[{"url":"https://github.com/grafana/loki/blob/main/README.md","locator":"Logging architecture: label indexing, Alloy collection and Grafana visualization","retrievedAt":"2026-10-07T01:53:53Z","kind":"vendor"},{"url":"https://github.com/grafana/loki/blob/main/LICENSE","locator":"GNU Affero General Public License version 3 header","retrievedAt":"2026-10-07T01:54:05Z","kind":"vendor"}],"document":{"version":1,"references":[{"url":"https://github.com/grafana/loki/blob/main/LICENSE","locator":"GNU Affero General Public License version 3 header","retrievedAt":"2026-10-07T01:54:05Z","id":"lo-license","title":"Grafana Loki license","kind":"vendor"},{"url":"https://github.com/grafana/loki/blob/main/README.md","locator":"Logging architecture: label indexing, Alloy collection and Grafana visualization","retrievedAt":"2026-10-07T01:53:53Z","id":"lo-readme","title":"Grafana Loki README","kind":"vendor"},{"url":"https://grafana.com/docs/loki/latest/get-started/labels/cardinality/","locator":"Impact of high-cardinality labels and use of structured metadata","retrievedAt":"2026-10-07T01:54:26Z","id":"lo-labels","title":"Loki cardinality","kind":"vendor"},{"url":"https://grafana.com/docs/loki/latest/operations/storage/retention/","locator":"Compactor retention defaults, object-store lifecycle alignment and non-retroactive changes","retrievedAt":"2026-10-07T01:54:05Z","id":"lo-retain","title":"Loki log retention","kind":"vendor"},{"url":"https://grafana.com/docs/loki/latest/send-data/promtail/","locator":"Promtail end of life on March 2, 2026; lambda-promtail exclusion","retrievedAt":"2026-10-07T01:54:47Z","id":"lo-promtail","title":"Promtail lifecycle","kind":"vendor"},{"url":"https://www.elastic.co/elasticsearch","locator":"Product overview: distributed search, analytics and deployment choices","retrievedAt":"2026-10-07T01:54:37Z","id":"es-home","title":"Elasticsearch overview","kind":"vendor"}],"overviewCitations":["lo-readme","lo-license"],"licenseCitations":["lo-license"],"sections":[{"id":"labels","heading":"Index design affects workload fit","paragraphs":[{"id":"labels-detail","content":[{"text":"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."}],"citations":["lo-labels"]}]},{"id":"retention","heading":"Retention requires deliberate configuration","paragraphs":[{"id":"retention-detail","content":[{"text":"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."}],"citations":["lo-retain"]}]},{"id":"collection","heading":"Collector lifecycle","paragraphs":[{"id":"collection-detail","content":[{"text":"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."}],"citations":["lo-promtail","lo-readme"]}]},{"id":"operations","heading":"The logging stack includes more than the backend","paragraphs":[{"id":"operations-detail","content":[{"text":"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."}],"citations":["lo-readme"]}]},{"id":"fit","heading":"Substitution considerations","paragraphs":[{"id":"fit-detail","content":[{"text":"Loki can replace "},{"text":"Elasticsearch","targetSlug":"elasticsearch"},{"text":" 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."}],"citations":["lo-readme","lo-labels","es-home"]}]}]},"id":"Q704","revision":752,"updatedAt":"2026-10-13T04:05:21Z","sourceUrl":"https://substitutefor.net/entities/Q704?revision=752"}}