Skip to content

Latest commit

 

History

History
 
 

production

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

Running Loki

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

Free Hosted Demo

Grafana is running a free, hosted demo cluster of Loki; instructions for getting access can be found at grafana.com.

Run Locally Using Docker

The Docker images for Loki and Promtail are available on DockerHub.

To test locally, we recommend using the docker-compose.yaml file in this directory:

  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 freshest, most up to date 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/. Follow the steps for configuring the datasource in Grafana and set the URL field to http://loki:3100.

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

Build and Run From Source

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

You need go v1.10+ installed locally.

$ go get github.com/grafana/loki
$ cd $GOPATH/src/github.com/grafana/loki # GOPATH is $HOME/go by default.

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

To run Promtail, use the following commands:

$ go build ./cmd/promtail
$ ./promtail -config.file=./cmd/promtail/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

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.