Grafana Loki aimed to create a more cost-effective and easier-to-operate logging solution compared to existing alternatives. It was built to work seamlessly with Prometheus and Grafana, making it particularly attractive for organizations already using those tools.

I like the Grafana ecosystem a lot. I think loki is an elegant scalable alternative for the rather resource heavy elasticsearch / ELK stack. Loki has a microservice architecture by default and scales like crazy, but is also easy to set up with single file binaries in smaller setups.

The engine allows you to collect and persist aggregated logdata in object store, and the storage isn’t based on full text indexing but uses some smart tricks to optimise storage.

notes

  • setting up through helm chart with no changes to values.yaml
  • very specific datasource settings
    • use port 80 on loki-gateway
    • use X-Scope-OrgID set to value fake
  • k8s-monitoring
    • setting default api to wrong prometheus url is just plain cruel
    • use writeEndpoint: /api/v1/write instead of the default one

sources