{"id":13393617,"url":"https://github.com/grafana/loki","last_synced_at":"2026-04-01T17:38:29.256Z","repository":{"id":37237284,"uuid":"129717717","full_name":"grafana/loki","owner":"grafana","description":"Like Prometheus, but for logs.","archived":false,"fork":false,"pushed_at":"2025-05-12T14:22:37.000Z","size":369258,"stargazers_count":25395,"open_issues_count":2122,"forks_count":3659,"subscribers_count":380,"default_branch":"main","last_synced_at":"2025-05-12T14:43:14.963Z","etag":null,"topics":["cloudnative","grafana","hacktoberfest","logging","loki","prometheus"],"latest_commit_sha":null,"homepage":"https://grafana.com/loki","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/grafana.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":"CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2018-04-16T09:22:48.000Z","updated_at":"2025-05-12T14:16:52.000Z","dependencies_parsed_at":"2023-10-14T14:16:57.909Z","dependency_job_id":"3e2bfdb0-cb39-483c-a1c2-cc3617929f68","html_url":"https://github.com/grafana/loki","commit_stats":{"total_commits":7110,"total_committers":1072,"mean_commits":6.632462686567164,"dds":0.9305203938115331,"last_synced_commit":"5bffc10d857a3ffaab2700cacc703bbf0f813379"},"previous_names":["grafana/logish"],"tags_count":309,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grafana%2Floki","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grafana%2Floki/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grafana%2Floki/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grafana%2Floki/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/grafana","download_url":"https://codeload.github.com/grafana/loki/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253758379,"owners_count":21959580,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cloudnative","grafana","hacktoberfest","logging","loki","prometheus"],"created_at":"2024-07-30T17:00:57.136Z","updated_at":"2025-10-18T07:10:44.325Z","avatar_url":"https://github.com/grafana.png","language":"Go","readme":"\u003cp align=\"center\"\u003e\u003cimg src=\"docs/sources/logo_and_name.png\" alt=\"Loki Logo\"\u003e\u003c/p\u003e\n\n\u003ca href=\"https://drone.grafana.net/grafana/loki\"\u003e\u003cimg src=\"https://drone.grafana.net/api/badges/grafana/loki/status.svg\" alt=\"Drone CI\" /\u003e\u003c/a\u003e\n\u003ca href=\"https://goreportcard.com/report/github.com/grafana/loki\"\u003e\u003cimg src=\"https://goreportcard.com/badge/github.com/grafana/loki\" alt=\"Go Report Card\" /\u003e\u003c/a\u003e\n\u003ca href=\"https://slack.grafana.com/\"\u003e\u003cimg src=\"https://img.shields.io/badge/join%20slack-%23loki-brightgreen.svg\" alt=\"Slack\" /\u003e\u003c/a\u003e\n[![Fuzzing Status](https://oss-fuzz-build-logs.storage.googleapis.com/badges/loki.svg)](https://bugs.chromium.org/p/oss-fuzz/issues/list?sort=-opened\u0026can=1\u0026q=proj:loki)\n\n# Loki: like Prometheus, but for logs.\n\nLoki is a horizontally-scalable, highly-available, multi-tenant log aggregation system inspired by [Prometheus](https://prometheus.io/).\nIt is designed to be very cost effective and easy to operate.\nIt does not index the contents of the logs, but rather a set of labels for each log stream.\n\nCompared to other log aggregation systems, Loki:\n\n- 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.\n- indexes and groups log streams using the same labels you’re already using with Prometheus, enabling you to seamlessly switch between metrics and logs using the same labels that you’re already using with Prometheus.\n- is an especially good fit for storing [Kubernetes](https://kubernetes.io/) Pod logs. Metadata such as Pod labels is automatically scraped and indexed.\n- has native support in Grafana (needs Grafana v6.0).\n\nA Loki-based logging stack consists of 3 components:\n\n- [Alloy](https://github.com/grafana/alloy) is agent, responsible for gathering logs and sending them to Loki.\n- [Loki](https://github.com/grafana/loki) is the main service, responsible for storing logs and processing queries.\n- [Grafana](https://github.com/grafana/grafana) for querying and displaying the logs.\n\n**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](https://github.com/grafana/alloy).**\n\nLoki 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.\nLoki differs from Prometheus by focusing on logs instead of metrics, and delivering logs via push, instead of pull.\n\n## Getting started\n\n* [Installing Loki](https://grafana.com/docs/loki/latest/installation/)\n* [Installing Alloy](https://grafana.com/docs/loki/latest/send-data/alloy/)\n* [Getting Started](https://grafana.com/docs/loki/latest/get-started/)\n\n## Upgrading\n\n* [Upgrading Loki](https://grafana.com/docs/loki/latest/upgrading/)\n\n## Documentation\n\n* [Latest release](https://grafana.com/docs/loki/latest/)\n* [Upcoming release](https://grafana.com/docs/loki/next/), at the tip of the main branch\n\nCommonly used sections:\n\n- [API documentation](https://grafana.com/docs/loki/latest/api/) for getting logs into Loki.\n- [Labels](https://grafana.com/docs/loki/latest/getting-started/labels/)\n- [Operations](https://grafana.com/docs/loki/latest/operations/)\n- [Promtail](https://grafana.com/docs/loki/latest/clients/promtail/) is an agent which tails log files and pushes them to Loki.\n- [Pipelines](https://grafana.com/docs/loki/latest/clients/promtail/pipelines/) details the log processing pipeline.\n- [Docker Driver Client](https://grafana.com/docs/loki/latest/clients/docker-driver/) is a Docker plugin to send logs directly to Loki from Docker containers.\n- [LogCLI](https://grafana.com/docs/loki/latest/query/logcli/) provides a command-line interface for querying logs.\n- [Loki Canary](https://grafana.com/docs/loki/latest/operations/loki-canary/) monitors your Loki installation for missing logs.\n- [Troubleshooting](https://grafana.com/docs/loki/latest/operations/troubleshooting/) presents help dealing with error messages.\n- [Loki in Grafana](https://grafana.com/docs/loki/latest/operations/grafana/) describes how to set up a Loki datasource in Grafana.\n\n## Getting Help\n\nIf you have any questions or feedback regarding Loki:\n\n- Search existing thread in the Grafana Labs community forum for Loki: [https://community.grafana.com](https://community.grafana.com/c/grafana-loki/)\n- Ask a question on the Loki Slack channel. To invite yourself to the Grafana Slack, visit [https://slack.grafana.com/](https://slack.grafana.com/) and join the #loki channel.\n- [File an issue](https://github.com/grafana/loki/issues/new) for bugs, issues and feature suggestions.\n- Send an email to [lokiproject@googlegroups.com](mailto:lokiproject@googlegroups.com), or use the [web interface](https://groups.google.com/forum/#!forum/lokiproject).\n- UI issues should be filed directly in [Grafana](https://github.com/grafana/grafana/issues/new).\n\nYour feedback is always welcome.\n\n## Further Reading\n\n- The original [design doc](https://docs.google.com/document/d/11tjK_lvp1-SVsFZjgOTr1vV3-q6vBAsZYIQ5ZeYBkyM/view) for Loki is a good source for discussion of the motivation and design decisions.\n- Callum Styan's March 2019 DevOpsDays Vancouver talk \"[Grafana Loki: Log Aggregation for Incident Investigations][devopsdays19-talk]\".\n- Grafana Labs blog post \"[How We Designed Loki to Work Easily Both as Microservices and as Monoliths][architecture-blog]\".\n- Tom Wilkie's early-2019 CNCF Paris/FOSDEM talk \"[Grafana Loki: like Prometheus, but for logs][fosdem19-talk]\" ([slides][fosdem19-slides], [video][fosdem19-video]).\n- David Kaltschmidt's KubeCon 2018 talk \"[On the OSS Path to Full Observability with Grafana][kccna18-event]\" ([slides][kccna18-slides], [video][kccna18-video]) on how Loki fits into a cloud-native environment.\n- Goutham Veeramachaneni's blog post \"[Loki: Prometheus-inspired, open source logging for cloud natives](https://grafana.com/blog/2018/12/12/loki-prometheus-inspired-open-source-logging-for-cloud-natives/)\" on details of the Loki architecture.\n- David Kaltschmidt's blog post \"[Closer look at Grafana's user interface for Loki](https://grafana.com/blog/2019/01/02/closer-look-at-grafanas-user-interface-for-loki/)\" on the ideas that went into the logging user interface.\n\n[devopsdays19-talk]: https://grafana.com/blog/2019/05/06/how-loki-correlates-metrics-and-logs--and-saves-you-money/\n[architecture-blog]: https://grafana.com/blog/2019/04/15/how-we-designed-loki-to-work-easily-both-as-microservices-and-as-monoliths/\n[fosdem19-talk]: https://fosdem.org/2019/schedule/event/loki_prometheus_for_logs/\n[fosdem19-slides]: https://speakerdeck.com/grafana/grafana-loki-like-prometheus-but-for-logs\n[fosdem19-video]: https://mirror.as35701.net/video.fosdem.org/2019/UB2.252A/loki_prometheus_for_logs.mp4\n[kccna18-event]: https://kccna18.sched.com/event/GrXC/on-the-oss-path-to-full-observability-with-grafana-david-kaltschmidt-grafana-labs\n[kccna18-slides]: https://speakerdeck.com/davkal/on-the-path-to-full-observability-with-oss-and-launch-of-loki\n[kccna18-video]: https://www.youtube.com/watch?v=U7C5SpRtK74\u0026list=PLj6h78yzYM2PZf9eA7bhWnIh_mK1vyOfU\u0026index=346\n\n## Contributing\n\nRefer to [CONTRIBUTING.md](CONTRIBUTING.md)\n\n### Building from source\n\nLoki can be run in a single host, no-dependencies mode using the following commands.\n\nYou need an up-to-date version of [Go](https://go.dev/), we recommend using the version found in our [Makefile](https://github.com/grafana/loki/blob/main/Makefile)\n\n```bash\n# Checkout source code\n$ git clone https://github.com/grafana/loki\n$ cd loki\n\n# Build binary\n$ go build ./cmd/loki\n\n# Run executable\n$ ./loki -config.file=./cmd/loki/loki-local-config.yaml\n```\n\nAlternatively, on Unix systems you can use `make` to build the binary, which adds additional arguments to the `go build` command.\n\n```bash\n# Build binary\n$ make loki\n\n# Run executable\n$ ./cmd/loki/loki -config.file=./cmd/loki/loki-local-config.yaml\n```\n\nTo build Promtail on non-Linux platforms, use the following command:\n\n```bash\n$ go build ./clients/cmd/promtail\n```\n\nOn Linux, Promtail requires the systemd headers to be installed if\nJournal support is enabled.\nTo enable Journal support the go build tag flag `promtail_journal_enabled` should be passed\n\nWith Journal support on Ubuntu, run with the following commands:\n\n```bash\n$ sudo apt install -y libsystemd-dev\n$ go build --tags=promtail_journal_enabled ./clients/cmd/promtail\n```\n\nWith Journal support on CentOS, run with the following commands:\n\n```bash\n$ sudo yum install -y systemd-devel\n$ go build --tags=promtail_journal_enabled ./clients/cmd/promtail\n```\n\nOtherwise, to build Promtail without Journal support, run `go build`\nwith CGO disabled:\n\n```bash\n$ CGO_ENABLED=0 go build ./clients/cmd/promtail\n```\n\n## Adopters\n\nPlease see [ADOPTERS.md](ADOPTERS.md) for some of the organizations using Loki today.\nIf you would like to add your organization to the list, please open a PR to add it to the list.\n\n## License\n\nGrafana Loki is distributed under [AGPL-3.0-only](LICENSE). For Apache-2.0 exceptions, see [LICENSING.md](LICENSING.md).\n","funding_links":[],"categories":["Go","6. Collector","Observability \u0026 Monitoring","Capabilities","Logging","Observability","hacktoberfest","Kubernetes","Monitoring \u0026 Logging","Logging and Monitoring","Logs","HarmonyOS","后端开发框架及项目","Distributed Tracing Solutions","prometheus","Application Recommendation","Monitoring Services","日志管理","APM Monitoring","一、核心工具集（按场景分类）","Not Marketed to Security"],"sub_categories":["Logging","Vector Database","Databases","Windows Manager","管理面板","Open Source Tools","📊 Data Analysis","[Jenkins](#jenkins)","Collector","8. 监控与可观测性（看清集群状态）","Kubernetes // Grafana","Proprietary Analytics Platforms, Lakehouses, etc"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgrafana%2Floki","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgrafana%2Floki","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgrafana%2Floki/lists"}