Skip to content

cyriltovena/loki

Repository files navigation

Loki: Like Prometheus, but for logs.

CircleCI Design doc

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

Run it locally

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

Loki consists of 3 components; loki is the main server, responsible for storing logs and processing queries. promtail is the agent, responsible for gather logs and sending them to loki and grafana as the UI.

To run loki, use the following commands:

$ go build ./cmd/loki
$ ./loki -config.file=./docs/loki-local-config.yaml
...

To run promtail, use the following commands:

$ go build ./cmd/promtail
$ ./promtail -config.file=./docs/promtail-local-config.yaml
...

Grafana is Loki's UI, so you'll also want to run one of those:

$ docker run -ti -p 3000:3000 -e "GF_EXPLORE_ENABLED=true" grafana/grafana:master

In the Grafana UI (http://localhost:3000), log in with "admin"/"admin", add a new "Grafana Logging" datasource for http://host.docker.internal:3100, then go to explore and enjoy!

About

Like Prometheus, but for logs.

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Go 90.9%
  • Jsonnet 3.4%
  • Ruby 1.8%
  • Yacc 0.8%
  • Makefile 0.8%
  • Shell 0.6%
  • Other 1.7%