Files
oam/knowledge base/loki.md
2025-01-06 17:37:39 +01:00

1.5 KiB

Grafana Loki

Horizontally scalable, highly available, multi-tenant log aggregation system inspired by Prometheus and designed to be very cost-effective and easy to operate.

  1. TL;DR
  2. Further readings
    1. Sources

TL;DR

It indexes a set of labels for each log stream instead of the full logs' contents.

Needs agents or other clients to push logs to the server.

Supports object storage solutions.

Setup
# Install via package repository.
apt install 'loki'
dnf install 'loki'

# Run via Docker.
docker run --name loki -d \
  -p '3100:3100' -v "$(pwd)/config/loki.yml:/etc/loki/config.yml:ro" \
  'grafana/loki:3.3.2' -config.file='/etc/loki/config.yml'

Default configuration file for package-based installations is /etc/loki/config.yml.

Usage
# Check the server is working
curl 'http://loki.fqdn:3100/ready'
curl 'http://loki.fqdn:3100/metrics'

Further readings

Sources