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/docker
keyolk 7b48422b6f
Fix typo (#3002)
5 years ago
..
chunks Add docker-compose cluster deployment file (#2740) 5 years ago
config Fix typo (#3002) 5 years ago
README.md Fix the docker image version in compose deployment (#3006) 5 years ago
docker-compose-ha-diagram.png Add docker-compose cluster deployment file (#2740) 5 years ago
docker-compose-ha-memberlist.yaml Fix the docker image version in compose deployment (#3006) 5 years ago

README.md

Loki cluster using docker-compose

To deploy a cluster of loki nodes on a local machine (as shown below), you could use the docker-compose-ha-member.yaml file.

Some features of the deployment:

  • Backend: 3 Loki servers enabled with distributor, ingester, querier module
  • Together they form a cluster ring based on memberlist mechanism (if using consul/etcd, modules can be separate for further separate read/write workloads)
  • Index data are stored and replicated through botldb-shipper
  • Replication_factor=2: the receiving distributor sends log data to 2 ingesters based on consistent hashing
  • Chunk storage is a shared directory mounted from the same host directory (to simulate S3 or gcs)
  • Query are performed through the two query frontend servers
  • An nginx gateway to route the write and read workloads from clients (Grafana, promtail)
  1. Ensure you have the most up-to-date Docker container images:

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

    docker-compose -f ./docker-compose-ha-memberlist.yaml up
    
  3. When adding data source in the grafana dashboard, using http://loki-gateway:3100 for the URL field.

  4. To clean up

    docker-compose -f ./docker-compose-ha-memberlist.yaml down
    

    Remove the chunk data under ./chunks/.