Like Prometheus, but for logs.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
loki/production
Deveshi Dwivedi f1cd4755a4
fix(deployment): Use conventional `combined` log format for NGINX access logs in loki-gateway (#18870)
3 weeks ago
..
docker fix(deployment): Use conventional `combined` log format for NGINX access logs in loki-gateway (#18870) 3 weeks ago
helm chore: Release GEL Helm chart 7.1.0 (#21915) 3 weeks ago
ksonnet chore(ksonnet)!: Remove boltdb-shipper specific flags from lib (#21656) 2 months ago
loki-mixin feat: default loki-mixin dashboards to TSDB (#18732) 2 months ago
loki-mixin-compiled feat: default loki-mixin dashboards to TSDB (#18732) 2 months ago
loki-mixin-compiled-ssd feat: default loki-mixin dashboards to TSDB (#18732) 2 months ago
nomad fix: Nomad simple example (#19629) 7 months ago
terraform/modules/s3 chore(deps): update terraform aws to ~> 6.40.0 (main) (#21526) 2 months ago
LICENSE_APACHE2 Re-license to AGPLv3 (#3630) 5 years ago
README.md feat: Remove Promtail support (#21245) 2 months ago
docker-compose.yaml feat(loki/docker compose): enable feature toggle (#14858) 2 years ago

README.md

Running Loki

Currently there are six ways to try out Loki, in order from easier to hardest:

For the various ways to send logs to Loki, see the Send data documentation.

Grafana Cloud: Hosted Logs

Grafana is offering hosted Loki as part of our broader Grafana Cloud platform. Learn more at grafana.com/loki.

Run locally using Docker

The Docker images for Loki are available on DockerHub.

To test locally, we recommend using the docker-compose.yaml file in this directory. Docker starts containers for Loki and Grafana.

  1. Either git clone this repository locally and cd loki/production, or download a copy of the docker-compose.yaml locally.

  2. Ensure you have the most up-to-date Docker container images:

    docker-compose pull
    
  3. Run the stack on your local Docker:

    docker-compose up
    
  4. Grafana should now be available at http://localhost:3000/.

For instructions on how to query Loki, see our usage docs.

To deploy a cluster of loki locally, please refer to this doc

Run with Nomad

There are example Nomad jobs that can be used to deploy Loki with Nomad - simple and powerful workload orchestrator from HashiCorp.

Using Helm to deploy on Kubernetes

Here is the Helm chart used to deploy Loki to Kubernetes:

Helm Chart version Loki version GEL version
4.4.3 2.7.3 1.6.1
4.4.2 2.7.2 1.6.1
4.4.1 2.7.0 1.6.0
4.4.0 2.7.0 1.6.0
4.3.0 2.7.0 1.6.0
4.2.0 2.7.0 1.6.0
4.1.0 2.7.0 1.6.0
4.0.0 2.7.0 1.6.0
3.10.0 2.7.0 1.6.0
3.9.0 2.7.0 1.6.0
3.8.2 2.7.0 1.6.0
3.8.1 2.7.0 1.6.0
3.8.0 2.7.0 1.6.0
3.7.0 2.7.0 1.6.0
3.6.1 2.7.0 1.6.0
3.6.0 2.7.0 1.6.0
3.5.0 2.6.1 1.6.0

Build and run from source

First, see the build from source section of the root readme.

Grafana is Loki's UI. To query your logs you need to start Grafana as well:

$ docker run -ti -p 3000:3000 grafana/grafana:master

Grafana should now be available at http://localhost:3000/. Follow the steps for configuring the datasource in Grafana and set the URL field to http://host.docker.internal:3100.

For instructions on how to use Loki, see our usage docs.

Get inspired by our production setup

We run Loki on Kubernetes with the help of ksonnet. You can take a look at our production setup.

To learn more about ksonnet, check out its documentation.