Skip to content

go-graphite/graphite-clickhouse

Folders and files

NameName
Last commit message
Last commit date

Latest commit

19f8ccb · Feb 11, 2025
Oct 9, 2024
Apr 24, 2024
Feb 21, 2023
Jan 19, 2023
Aug 12, 2024
Feb 11, 2025
Apr 24, 2024
Feb 11, 2025
Feb 3, 2023
Feb 11, 2025
Mar 7, 2023
Oct 30, 2024
Feb 20, 2024
Apr 24, 2024
Feb 20, 2024
Oct 14, 2024
Jan 19, 2023
Jul 4, 2023
Feb 11, 2025
Oct 14, 2024
Jul 5, 2024
Feb 20, 2024
Dec 26, 2023
Dec 18, 2024
Dec 20, 2023
Feb 18, 2021
Mar 22, 2022
Nov 11, 2016
Oct 30, 2024
Nov 21, 2022
Jan 13, 2025
Jan 13, 2025
Sep 16, 2024
Oct 9, 2024
Oct 9, 2024

Repository files navigation

deb rpm

graphite-clickhouse

Graphite cluster backend with ClickHouse support

Work scheme

stack.png

Gray components are optional or alternative

TL;DR

Preconfigured docker-compose

Docker

Docker images are available on packages page.

Compatibility

Build

Required golang 1.18+

# build binary
git clone https://github.com/lomik/graphite-clickhouse.git
cd graphite-clickhouse
make

Installation

  1. Setup Yandex ClickHouse and carbon-clickhouse
  2. Setup and configure graphite-clickhouse
  3. Add graphite-clickhouse host:port to graphite-web CLUSTER_SERVERS

Configuration

See configuration documentation.

Special headers processing

Some HTTP headers are processed specially by the service

Request headers

Grafana headers: X-Dashboard-Id, X-Grafana-Org-Id, and X-Panel-Id are logged and passed further to the ClickHouse.

Debug headers (see debugging.md for details):

  • X-Gch-Debug-External-Data - when this header is set to anything and every of directory, directory-perm, and external-data-perm parameters in [debug] is set and valid, service will save the dump of external data tables in the directory for debug output.
  • X-Gch-Debug-Output - header to enable special processing for format=carbonapi_v3_pb and format=json render output.
  • X-Gch-Debug-Protobuf - header enables the original marshallers for protobuf and carbonapi_v3_pb to check the binary data integrity.

Response headers

  • X-Gch-Request-Id - the current request ID.
  • X-Cached-Find - Flag for find cache hit.

Run on same host with old graphite-web 0.9.x

By default graphite-web won't connect to CLUSTER_SERVER on localhost. Cheat:

class ForceLocal(str):
    def split(self, *args, **kwargs):
        return ["8.8.8.8", "8080"]

CLUSTER_SERVERS = [ForceLocal("127.0.0.1:9090")]