Skip to content
Jiacai Liu edited this page Jun 18, 2022 · 19 revisions

Welcome to the prometheus on CeresDB wiki!

This forked version is based on prometheus 2.23.1, main branch is ceresdb.

GETTING STARTED

Build

git clone [email protected]:CeresDB/prometheus.git && cd prometheus
git branch ceresdb
go build ./cmd/prometheus

Run

  1. Start ceresdb server
  2. Start prometheus server
  3. /api/v1/query /api/v1/query_range will automatically query data in ceresdb via extended remote query api.

Config

var meaning default
CERESDB_GRPC_ADDR ceresdb gRPC address :8831
CERESDB_ENABLE_DEBUG enable debug log false
CERESDB_GRPC_TIMEOUT grpc timeout duration 1m
CERESDB_REMOTE_WRITE hack /api/v1/write, write to ceresdb false

How

Prometheus's remote read interface is designed for external storage integration, CeresDB support this.

However, remote read is inefficient due to its poor extensibility in large scale distributed environment for reasons below:

  • Function in ReadHints can only be a string, which mean only one function can be pushdown at a time.
  • Besides, eval inside engine knows nothing about function pushdown, so functions may be evaluated twice(one in remote storage, the other in Prometheus), which produces wrong result.

Due to reasons above, CeresDB support another integration:

Extend remote read interface to support arbitrary nested functions and modify engine to support function pushdown.

Untitled

CeresDB will implement frequent used functions(eg rate/sum) so those can be pushdown. In this way CeresDB could generate a distributed PromQL query plan to fully utilize system resources for higher performance.

Clone this wiki locally