Super experimental, fully functional Loki API emulator in GO for Clickhouse
APIs are compatible with Grafana Explore and paStash for logs ingestion
🔥 Beta Stage, Contributions Welcome! Do not use this for anything serious.. yet!
The Loki API and its Grafana native integration are brilliant, simple and appealing - but we just love Clickhouse.
cLoki implements the same API functionality as Loki in GO, sitting on top of Clickhouse tables and relying on its columnar search and insert performance alongside solid distribuion and clustering capabilities for stored data. Just like Loki, cLoki does not parse or index incoming logs, but rather groups log streams using the same label system as Prometheus.
The current purpose of this project is to research and understand inner aspects of the original implementation.
- golang 1.13+
To get dependencies and compile the latest cloki-webapp from source, use the following commands:
make modules
make all
Before using the application, configure all database parameters using the example configuration file:
clokiapp_config.json
./cloki-go -h
./cloki-go -config-path /etc
To initialize the database and tables required by the application use the following commands:
./cloki-go --initialize_db
./cloki-go -create-cloki-user -database-root=default -database-host=localhost -database-root-password=password
./cloki-go -create-cloki-db -database-root=default -database-host=localhost -database-root-password=password -database-cloki-user=cloki_user
./cloki-go -create-table-db-config
WEBAPPENV = config file extension "local"
WEBAPPPATH - path for config
WEBAPPLOGPATH - path to the log dir
WEBAPPLOGNAME - prefix name of the log
This project is released under the Apache License 2.0
This Open-Source project is made possible by actual Humans without corporate sponsors, angels or patreons.
If you use this software in production, please consider supporting its development with contributions or donations