Code Monkey home page Code Monkey logo

cloki-go's Introduction

cLoki-go

like Loki, but for Clickhouse.

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! :octocat: Do not use this for anything serious.. yet!

ezgif com-optimize 15

Project Background

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.

Instructions

Requirements

  • golang 1.13+

Installation

To get dependencies and compile the latest cloki-webapp from source, use the following commands:

make modules
make all

Configuration

Before using the application, configure all database parameters using the example configuration file:

clokiapp_config.json

Usage

Command Help
./cloki-go -h
Custom Config in /etc
./cloki-go -config-path /etc
Initialization

To initialize the database and tables required by the application use the following commands:

./cloki-go --initialize_db
Create User
./cloki-go -create-cloki-user -database-root=default -database-host=localhost -database-root-password=password
Create CLOKI DBs
./cloki-go -create-cloki-db -database-root=default -database-host=localhost -database-root-password=password -database-cloki-user=cloki_user

Create Table / Migration - connection data will be read from webapp_config.json
./cloki-go -create-table-db-config 

Usage ENV

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

Made by Humans

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

Donate

(C) 2020 QXIP BV

cloki-go's People

Contributors

adubovikov avatar aqsyonas avatar lmangani avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.