loglama

LogLama + Grafana Example (Docker Compose)

This example demonstrates how to run LogLama and Grafana together using Docker Compose. Grafana can be configured to visualize logs or metrics produced by LogLama.

Prerequisites

Usage

  1. Clone this repository or copy the example directory.
  2. Place a valid .env file for LogLama as devlama.env in this directory if needed.
  3. Start the services:
    docker compose up -d
    
  4. Access LogLama at http://localhost:5000
  5. Access Grafana at http://localhost:3000
    • Default login: admin / admin

Grafana Integration

LogLama stores logs in files and SQLite. Grafana can visualize data from supported datasources:

Example: Connecting Grafana to LogLama SQLite

  1. Install the SQLite datasource plugin in Grafana.
  2. Configure the datasource to point to /logs/loglama.db (mount this volume in the Grafana container if needed).
  3. Create dashboards/queries in Grafana using SQL.

Example: File-based Log Integration (Loki)

  1. Add a Loki service to docker-compose.yml and configure it to read from /logs.
  2. Add Loki as a datasource in Grafana.
  3. Visualize logs in Grafana using the Explore tab.

Notes

Cleanup

docker compose down -v

For more details, see the main LogLama documentation and the Grafana plugin docs.