Home

Awesome

CKibana Logo (Light) CKibana Logo (Dark)

License Release

ClickHouse adapter for Kibana

ClickHouse proxy for Kibana

Clickhouse visualization tool

English | 简体中文


Introduce

CKibana is a service for convenient analysis of ClickHouse data using native Kibana.

A typical use case is when nginx log storage is migrated from ElasticSearch to ClickHouse,users can seamlessly continue their log query and analysis with Kibana.

It is recommended to use version 6.x of Kibana. This version is used internally and has been more thoroughly tested.

tlb.gif

Features

Supported Aggregation Syntax:

ES SyntaxNote
terms
sum
min
max
avg
percentile_ranks
percentiles
filtersCurrently, only the first level of aggregation is supported.
filter item
cardinality

UnSupported Syntax:

Kibana Query Language(KQL) is not supported, it is recommended to use the lucene instead。

img_1.png

Get started

quick start

To quickly experience Kibana, you can deploy it quickly using docker-compose.

ckibana-quick-start-doc

# Enter the docker-compose directory.
cd ckibana/docker-compose
# Deploy
docker-compose up -d

After deployment is complete, access Kibana in a browser at: http://127.0.0.1:5601/

A process with built-in mock data has been included. After importing the Kibana configuration file (dashboard, index-pattern, etc.), you can start experiencing it!

Configuration file path:docker-compose/quickstart-export.json Effect display:

Local run CKibana

CKibana can be run on all major operating systems and requires Java JDK version 17 or higher to be installed. To check, please run:java -version:

$ java -version
java version "17.0.5" 

The proxy service depends on the ES, CK, and Kibana services, which need to be prepared in advance. The following steps only include querying data from CK and do not include writing data to CK.

1)Create a database and a table

To initialize database and table structures in ClickHouse, please refer to:api-docs Detailed explanation of creating a table

2)Start CKibana

To modify the ES configuration in CKibana, you need to change it to your own ES information. The configuration file path is src/main/resources/application.yml

metadata-config:
  hosts: your es metadata cluster hosts
  headers:
    headerKey: yourHeaderValue

Package and run or run locally directly com.ly.ckibana.Bootstrap

### start ckibana
$ nohup java -jar ckibana.jar > run.out 2>&1 &

### check whether ckibana is successfully started
$ tail -f ~/logs/app.log
Tomcat started on port(s): 8080 (http) with context path ''
Started Bootstrap in 1.474 seconds

3)start kibana

Configure the elasticsearchHosts parameter in Kibana to the CKibana proxy address, so that it can be routed to the proxy service.

eg:elasticsearchHosts=http://ip:port

4)Configure the index pattern whitelist

Only after configuring the corresponding whitelist can you proceed to create it in the next step index patternThe configured whitelist needs to be consistent with the table name,please refer to:api-docs Update the whitelist index interface

5)Create index pattern in Kibana

eg:If the CK table name is `table_test`, then create an index pattern `table_test`

After completing the above 5 steps, you can create a dashboard and start using it.

TODO

Documentation

CKibana-docs

Contributors

<a href="https://github.com/TongchengOpenSource/ckibana/graphs/contributors"><img src="https://opencollective.com/ckibana/contributors.svg?width=890" /></a>

Join us

The group supports both Enterprise WeChat and personal WeChat accounts

HelloGithub计划

<a href="https://hellogithub.com/repository/0bcbf56bab0140c7983ecd57eb3dddde" target="_blank"><img src="https://api.hellogithub.com/v1/widgets/recommend.svg?rid=0bcbf56bab0140c7983ecd57eb3dddde&claim_uid=G2Xcw3hN9ZkEloL" alt="Featured|HelloGitHub" style="width: 250px; height: 54px;" width="250" height="54" /></a>

License

Apache License, Version 2.0 Copyright (C) Apache Software Foundation