cloki-go

command module
v0.0.0-...-a14c69b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 2, 2022 License: AGPL-3.0 Imports: 18 Imported by: 0

README

cLoki-go

like Loki, but for Clickhouse.
  • This is a WIP fork. For active development & stable features please use cloki

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

Documentation

Overview

CLoki-App

CLoki-App User interface for WEB AI

    Schemes: http
    Host: localhost:9080
    BasePath: /api/v3
    Version: 1.1.2
    License: AGPL https://www.gnu.org/licenses/agpl-3.0.en.html
	   Copyright: QXIP B.V. 2019-2020
    Contact: Aqs <aqsyounas@gmail.com>
    Contact: Alexandr Dubovikov <alexandr.dubovikov@gmail.com>

    Consumes:
    - application/json

    Produces:
    - application/json
    Security:
    - bearer

    SecurityDefinitions:
    bearer:
         type: apiKey
         name: Authorization
         in: header

swagger:meta

Directories

Path Synopsis
controller
v1
data
network
router
v1
system
utils

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL