# Loki

> a set of components that can be composed into a fully featured logging stack

**Wikidata**: [Q116149533](https://www.wikidata.org/wiki/Q116149533)  
**Source**: https://4ort.xyz/entity/loki-q116149533

## Summary
Loki is a set of components that can be composed into a fully featured logging stack, designed as a horizontally-scalable, highly-available, multi-tenant log aggregation system inspired by Prometheus. It is developed by Grafana Labs and available as both open-source software and a hosted service. Loki ingests logs from various sources and stores them in a cost-effective manner while enabling powerful querying and visualization through Grafana.

## Key Facts
- Loki was first released in version 0.1.0 on June 3, 2019
- It is licensed under the Apache License 2.0 (Q27017232)
- The software is classified as both a monitoring application and free software
- Loki's source code is hosted on GitHub at https://github.com/grafana/loki
- The official website is https://grafana.com/products/cloud/logs/
- Loki reached stable version 1.4.1 on April 6, 2020
- It features a logo available at https://commons.wikimedia.org/wiki/Special:FilePath/Grafana_loki_logo.png
- Loki is also known by the alias "Grafana Loki"
- The software is copyrighted but distributed as free software
- An official demo is available at https://grafana.com/auth/sign-up/create-user?pg=logs&plcmt=hero-btn-1

## FAQs
### Q: What is Loki used for?
A: Loki is used for log aggregation and monitoring, allowing users to collect, store, and query logs from various sources in a cost-effective manner. It integrates seamlessly with Grafana for visualization and analysis.

### Q: Is Loki free to use?
A: Yes, Loki is free software distributed under the Apache License 2.0, though Grafana Labs also offers a hosted service called Grafana Cloud Logs.

### Q: How does Loki differ from traditional logging systems?
A: Unlike traditional logging systems that index the contents of log lines, Loki indexes only metadata and stores log content in compressed chunks, making it more cost-effective and scalable for large-scale log management.

## Why It Matters
Loki represents a significant advancement in log management technology by applying the same principles that made Prometheus successful for metrics to the domain of logging. Its approach of indexing only metadata while storing compressed log content addresses the cost and scalability challenges that have traditionally plagued log aggregation systems. By integrating tightly with Grafana, Loki provides a unified observability platform where users can correlate logs with metrics and traces. This is particularly valuable for modern distributed systems where understanding system behavior requires analyzing multiple data types together. The open-source nature of Loki has fostered a vibrant ecosystem of contributors and integrations, making it a compelling choice for organizations of all sizes seeking to implement comprehensive observability without prohibitive costs.

## Notable For
- Being inspired by Prometheus but designed specifically for logs rather than metrics
- Implementing a unique indexing strategy that stores only metadata, not full log content
- Providing seamless integration with Grafana for unified metrics and logs visualization
- Offering both open-source deployment and hosted service options
- Supporting multi-tenancy out of the box for cloud-native environments

## Body
### Architecture and Design
Loki is built as a set of microservices that work together to provide a complete logging solution. The core components include the distributor, ingester, querier, and storage backend. This modular architecture allows for horizontal scaling and high availability, making it suitable for large-scale deployments.

### Storage Efficiency
One of Loki's key innovations is its approach to storage. Rather than indexing the full content of log lines like traditional systems (e.g., Elasticsearch), Loki indexes only a set of labels for each log stream and stores the raw log content in compressed chunks in object storage. This dramatically reduces storage costs and improves query performance for common use cases.

### Integration with Grafana Ecosystem
Loki is designed to work seamlessly with Grafana, allowing users to query logs using LogQL (a query language similar to PromQL) directly within Grafana dashboards. This tight integration enables unified observability where logs, metrics, and traces can be analyzed together in a single interface.

### Cloud-Native Design
Loki embraces cloud-native principles with built-in support for Kubernetes and Docker. It can automatically discover log sources in containerized environments and provides features like dynamic service discovery and automatic log rotation that are essential for modern microservices architectures.

### Version History
Since its initial release in June 2019, Loki has seen rapid development with major versions released approximately every 1-2 months. The project has matured significantly, adding features like tracing support, improved query performance, and enhanced storage backends while maintaining backward compatibility.

## References

1. [Release 0.1.0. 2019](https://github.com/grafana/loki/releases/tag/v0.1.0)
2. [Release 0.2.0. 2019](https://github.com/grafana/loki/releases/tag/v0.2.0)
3. [Release 0.3.0. 2019](https://github.com/grafana/loki/releases/tag/v0.3.0)
4. [Release 0.4.0. 2019](https://github.com/grafana/loki/releases/tag/v0.4.0)
5. [Release 1.0.0. 2019](https://github.com/grafana/loki/releases/tag/v1.0.0)
6. [Release 1.1.0. 2019](https://github.com/grafana/loki/releases/tag/v1.1.0)
7. [Release 1.2.0. 2019](https://github.com/grafana/loki/releases/tag/v1.2.0)
8. [Release 1.3.0. 2020](https://github.com/grafana/loki/releases/tag/v1.3.0)
9. [Release 1.4.0. 2020](https://github.com/grafana/loki/releases/tag/v1.4.0)
10. [Release 1.4.1. 2020](https://github.com/grafana/loki/releases/tag/v1.4.1)
11. [Release 1.5.0. 2020](https://github.com/grafana/loki/releases/tag/v1.5.0)
12. [Release 1.6.0. 2020](https://github.com/grafana/loki/releases/tag/v1.6.0)
13. [Release 1.6.1. 2020](https://github.com/grafana/loki/releases/tag/v1.6.1)
14. [Release 2.0.0. 2020](https://github.com/grafana/loki/releases/tag/v2.0.0)
15. [Release 2.0.1. 2020](https://github.com/grafana/loki/releases/tag/v2.0.1)
16. [Release 2.1.0. 2020](https://github.com/grafana/loki/releases/tag/v2.1.0)
17. [Release 2.2.0. 2021](https://github.com/grafana/loki/releases/tag/v2.2.0)
18. [Release 2.2.1. 2021](https://github.com/grafana/loki/releases/tag/v2.2.1)
19. [Release 2.3.0. 2021](https://github.com/grafana/loki/releases/tag/v2.3.0)
20. [Release 2.4.0. 2021](https://github.com/grafana/loki/releases/tag/v2.4.0)
21. [Release 2.4.1. 2021](https://github.com/grafana/loki/releases/tag/v2.4.1)
22. [Release 2.4.2. 2022](https://github.com/grafana/loki/releases/tag/v2.4.2)
23. [Release 2.5.0. 2022](https://github.com/grafana/loki/releases/tag/v2.5.0)
24. [Release 2.6.0. 2022](https://github.com/grafana/loki/releases/tag/v2.6.0)
25. [Release 2.6.1. 2022](https://github.com/grafana/loki/releases/tag/v2.6.1)
26. [Release 2.7.0. 2022](https://github.com/grafana/loki/releases/tag/v2.7.0)
27. [Release 2.7.1. 2022](https://github.com/grafana/loki/releases/tag/v2.7.1)
28. [Release 2.7.2. 2023](https://github.com/grafana/loki/releases/tag/v2.7.2)
29. [Release 2.7.3. 2023](https://github.com/grafana/loki/releases/tag/v2.7.3)
30. [Release 2.7.4. 2023](https://github.com/grafana/loki/releases/tag/v2.7.4)
31. [Release 2.7.5. 2023](https://github.com/grafana/loki/releases/tag/v2.7.5)
32. [Release 2.7.6. 2023](https://github.com/grafana/loki/releases/tag/v2.7.6)
33. [Release 2.7.7. 2023](https://github.com/grafana/loki/releases/tag/v2.7.7)
34. [Release 2.8.0. 2023](https://github.com/grafana/loki/releases/tag/v2.8.0)
35. [Release 2.8.1. 2023](https://github.com/grafana/loki/releases/tag/v2.8.1)
36. [Release 2.8.2. 2023](https://github.com/grafana/loki/releases/tag/v2.8.2)
37. [Release 2.8.3. 2023](https://github.com/grafana/loki/releases/tag/v2.8.3)
38. [Release 2.8.4. 2023](https://github.com/grafana/loki/releases/tag/v2.8.4)
39. [Release 2.8.5. 2023](https://github.com/grafana/loki/releases/tag/v2.8.5)
40. [Release 2.9.0. 2023](https://github.com/grafana/loki/releases/tag/v2.9.0)
41. [Release 2.9.1. 2023](https://github.com/grafana/loki/releases/tag/v2.9.1)
42. [Release 2.8.6. 2023](https://github.com/grafana/loki/releases/tag/v2.8.6)
43. [Release 2.9.2. 2023](https://github.com/grafana/loki/releases/tag/v2.9.2)
44. [Release 2.8.7. 2023](https://github.com/grafana/loki/releases/tag/v2.8.7)
45. [Release 2.9.3. 2023](https://github.com/grafana/loki/releases/tag/v2.9.3)
46. [Release 2.8.8. 2024](https://github.com/grafana/loki/releases/tag/v2.8.8)
47. [Release 2.9.4. 2024](https://github.com/grafana/loki/releases/tag/v2.9.4)
48. [Release 2.8.9. 2024](https://github.com/grafana/loki/releases/tag/v2.8.9)
49. [Release 2.8.10. 2024](https://github.com/grafana/loki/releases/tag/v2.8.10)
50. [Release 2.8.11. 2024](https://github.com/grafana/loki/releases/tag/v2.8.11)