0
0
Fork 0
mirror of https://github.com/grafana/loki.git synced 2026-05-14 02:45:34 +00:00
Like Prometheus, but for logs. https://grafana.com/loki
  • Go 96.6%
  • Jsonnet 1.4%
  • Smarty 0.5%
  • Makefile 0.4%
  • Ruby 0.4%
  • Other 0.5%
Find a file
2026-05-13 16:47:35 -06:00
.claude chore: Add AI agent tooling and rename agent documentation (#20609) 2026-01-30 15:21:44 -07:00
.cursor/skills/go chore: remove unused frontend cursor rule (#20674) 2026-02-04 13:23:08 +00:00
.devcontainer chore(deps): update grafana/loki-build-image docker tag to v0.35.1 (main) (#21313) 2026-04-03 16:06:16 -04:00
.github chore(operator): Make release PRs adhere to new convention for commits (#21834) 2026-05-12 16:32:42 +01:00
.vscode chore: add shared vscode launch config (#20103) 2025-12-05 09:20:56 -05:00
clients chore: Unlink logentry and fluentbit (#21774) 2026-05-06 15:29:18 -04:00
cmd fix(canary): Default streamvalue to "push" when -push=true (#21715) 2026-05-07 08:45:04 -04:00
debug docs: fix Promtail / Loki capitalization (#1130) 2019-10-08 09:41:41 -04:00
docs feat(dataobj-compactor): Add dataobj-compactor-worker target scaffold (#21873) 2026-05-13 16:47:35 -06:00
examples docs: CoPilot edit missed in 18006 (#21426) 2026-04-06 17:25:55 -04:00
integration chore: single binary without Kafka (#21318) 2026-04-24 16:40:55 +05:30
loki-build-image chore(ci): Cache build container (#21790) 2026-05-08 09:24:07 -04:00
nix chore: update go version to 1.26.2 (#21464) 2026-04-21 12:01:51 +02:00
operator chore(operator): Make release PRs adhere to new convention for commits (#21834) 2026-05-12 16:32:42 +01:00
pkg feat(dataobj-compactor): Add dataobj-compactor-worker target scaffold (#21873) 2026-05-13 16:47:35 -06:00
production docs(helm): Document 6.46.0 default service-account name change (#21832) 2026-05-12 09:48:14 -04:00
tools chore!: Remove deprecated per-tenant setting unordered_writes (#21835) 2026-05-13 09:40:06 +02:00
vendor fix(deps): Revert "Update module google.golang.org/grpc to v1.81.0 (main)" (#21850) 2026-05-13 17:16:44 +10:00
.dockerignore chore: Add tools/dev/kafka/data to .dockerignore (#19897) 2025-11-17 22:17:54 +01:00
.gitattributes Enable merge union strategy for CHANGELOG.md. (#5102) 2022-01-11 22:18:54 +02:00
.gitignore feat: Remove Promtail support (#21245) 2026-03-25 09:19:49 -03:00
.gitmodules operator: Publish docs as public website (#6449) 2022-06-30 11:54:49 +02:00
.golangci.yml chore(build): Tweaks to support golangci-lint 2.10.1 (#20985) 2026-02-26 11:56:42 -05:00
.lychee.toml Add a target to find dead link in our documentation. (#3713) 2021-05-12 05:03:50 -04:00
.release-please-manifest.json chore( operator): community release 0.10.1 (#21189) 2026-04-16 11:03:04 +01:00
ADOPTERS.md feat: add toleration for bloom components (#12653) 2024-04-19 15:43:03 +01:00
AGENTS.md chore: Improve AGENTS.md (#21805) 2026-05-11 14:07:53 +02:00
CHANGELOG.md chore: Reflect recent releases in CHANGELOG.md on main branch (#21621) 2026-04-20 10:44:30 +02:00
CODE_OF_CONDUCT.md Change conduct contact email address (#2425) 2020-07-27 08:38:41 -04:00
codecov.yml Attempting to add informational only feedback for codecov (#1647) 2020-02-06 15:04:08 -05:00
CODEOWNERS chore: Make oss big tent codeowners of grammar file to be notified about new grammar (#18145) 2025-06-20 09:25:38 -04:00
CODING_STANDARDS.md docs: Revamp contributing guidelines (#21438) 2026-04-17 11:22:41 +02:00
CONTRIBUTING.md docs: Revamp contributing guidelines (#21438) 2026-04-17 11:22:41 +02:00
crosscompile.mk feat(ci): Include linux/riscv64 Loki build in releases (#21597) 2026-04-20 07:32:58 +00:00
flake.lock chore: Update go mod version to 1.26.2 (#21761) 2026-05-04 16:39:51 +05:30
flake.nix chore: update go version to 1.26.2 (#21464) 2026-04-21 12:01:51 +02:00
go.mod fix(deps): Revert "Update module google.golang.org/grpc to v1.81.0 (main)" (#21850) 2026-05-13 17:16:44 +10:00
go.sum fix(deps): Revert "Update module google.golang.org/grpc to v1.81.0 (main)" (#21850) 2026-05-13 17:16:44 +10:00
LICENSE Re-license to AGPLv3 (#3630) 2021-04-20 19:02:50 +02:00
LICENSING.md fix(promtail): Handle docker logs when a log is split in multiple frames (#12374) 2024-04-26 10:40:46 -07:00
MAINTAINERS.md Update MAINTAINERS.md (#11666) 2024-01-16 11:34:50 -05:00
Makefile chore: Remove Bigtable backup tool (#21794) 2026-05-08 09:28:12 -04:00
mkdocs.yml docs: general documentation rework 2019-09-06 13:44:24 -04:00
README.md feat: Remove Promtail support (#21245) 2026-03-25 09:19:49 -03:00
relyance.yaml chore(ci): Add relyance scanner (#17777) 2025-05-21 13:17:49 +00:00

Loki Logo

Check Go Report Card Slack Fuzzing Status

Loki: like Prometheus, but for logs.

Loki is a horizontally-scalable, highly-available, multi-tenant log aggregation system inspired by Prometheus. It is designed to be very cost effective and easy to operate. It does not index the contents of the logs, but rather a set of labels for each log stream.

Compared to other log aggregation systems, Loki:

  • does not do full text indexing on logs. By storing compressed, unstructured logs and only indexing metadata, Loki is simpler to operate and cheaper to run.
  • indexes and groups log streams using the same labels youre already using with Prometheus, enabling you to seamlessly switch between metrics and logs using the same labels that youre already using with Prometheus.
  • is an especially good fit for storing Kubernetes Pod logs. Metadata such as Pod labels is automatically scraped and indexed.
  • has native support in Grafana (needs Grafana v6.0).

A Loki-based logging stack consists of 3 components:

  • Alloy is agent, responsible for gathering logs and sending them to Loki.
  • Loki is the main service, responsible for storing logs and processing queries.
  • Grafana for querying and displaying the logs.

Note that Alloy replaced Promtail in the stack, because Promtail is considered to be feature complete, and future development for logs collection will be in Grafana Alloy.

Loki is like Prometheus, but for logs: we prefer a multidimensional label-based approach to indexing, and want a single-binary, easy to operate system with no dependencies. Loki differs from Prometheus by focusing on logs instead of metrics, and delivering logs via push, instead of pull.

Getting started

⚠️ Helm Chart Migration

Effective March 16, 2026, the Grafana Loki Helm chart will be forked to a new repository grafana-community/helm-charts. The chart in the Loki repository will continue to be maintained for GEL users only. See #20705 for details.

Upgrading

Documentation

Commonly used sections:

Getting Help

If you have any questions or feedback regarding Loki:

Your feedback is always welcome.

Further Reading

Contributing

Refer to CONTRIBUTING.md

Building from source

Loki can be run in a single host, no-dependencies mode using the following commands.

You need an up-to-date version of Go, we recommend using the version found in our Makefile

# Checkout source code
$ git clone https://github.com/grafana/loki
$ cd loki

# Build binary
$ go build ./cmd/loki

# Run executable
$ ./loki -config.file=./cmd/loki/loki-local-config.yaml

Alternatively, on Unix systems you can use make to build the binary, which adds additional arguments to the go build command.

# Build binary
$ make loki

# Run executable
$ ./cmd/loki/loki -config.file=./cmd/loki/loki-local-config.yaml

To run multiple Loki tenants locally, ensure that auth_enabled is set to true and provide a runtime config with any tenant specific overrides.

# Build binary
$ make loki

# Run executable
./loki -config.file=./cmd/loki/loki-local-multi-tenant-config.yaml -runtime-config.file=./cmd/loki/loki-overrides.yaml

Adopters

Please see ADOPTERS.md for some of the organizations using Loki today. If you would like to add your organization to the list, please open a PR to add it to the list.

License

Grafana Loki is distributed under AGPL-3.0-only. For Apache-2.0 exceptions, see LICENSING.md.