All Projects → Percona-Lab → Promhouse

Percona-Lab / Promhouse

Licence: apache-2.0
PromHouse is a long-term remote storage with built-in clustering and downsampling for Prometheus 2.x on top of ClickHouse.

Programming Languages

go
31211 projects - #10 most used programming language

Projects that are alternatives of or similar to Promhouse

Clickhouse exporter
This is a simple server that periodically scrapes ClickHouse stats and exports them via HTTP for Prometheus(https://prometheus.io/) consumption.
Stars: ✭ 193 (-8.96%)
Mutual labels:  clickhouse, prometheus
Trickster
Open Source HTTP Reverse Proxy Cache and Time Series Dashboard Accelerator
Stars: ✭ 1,306 (+516.04%)
Mutual labels:  clickhouse, prometheus
Blackbox exporter
Blackbox prober exporter
Stars: ✭ 2,633 (+1141.98%)
Mutual labels:  prometheus
Oracledb exporter
Prometheus Oracle database exporter.
Stars: ✭ 209 (-1.42%)
Mutual labels:  prometheus
Exporter exporter
A reverse proxy designed for Prometheus exporters
Stars: ✭ 194 (-8.49%)
Mutual labels:  prometheus
Prometheus Rpm
Prometheus RPM Packages
Stars: ✭ 190 (-10.38%)
Mutual labels:  prometheus
Synch
Sync data from the other DB to ClickHouse(cluster)
Stars: ✭ 200 (-5.66%)
Mutual labels:  clickhouse
Promansible
PromAnsible, 集成了Prometheuse(基于时间序列数据的服务监控系统)和Ansible(超级简单好用的IT自动化系统),并通过事件报警机制把二者紧密的结合在一起,并配以简单易用的WebUI,真正实现了监控-报警-处理一条龙的全自动化服务。
Stars: ✭ 183 (-13.68%)
Mutual labels:  prometheus
Smokeping prober
Prometheus style smokeping
Stars: ✭ 212 (+0%)
Mutual labels:  prometheus
Awesome Prometheus Alerts
🚨 Collection of Prometheus alerting rules
Stars: ✭ 3,323 (+1467.45%)
Mutual labels:  prometheus
K8s Gitops
GitOps principles to define kubernetes cluster state via code. Community around [email protected] is on discord: https://discord.gg/7PbmHRK
Stars: ✭ 192 (-9.43%)
Mutual labels:  prometheus
K8s Deployment Strategies
Kubernetes deployment strategies explained
Stars: ✭ 2,649 (+1149.53%)
Mutual labels:  prometheus
Metabase Clickhouse Driver
ClickHouse database driver for the Metabase business intelligence front-end
Stars: ✭ 202 (-4.72%)
Mutual labels:  clickhouse
Wgcloud
linux运维监控工具,支持系统信息,内存,cpu,温度,磁盘空间及IO,硬盘smart,系统负载,网络流量等监控,API接口,大屏展示,拓扑图,进程监控,端口监控,docker监控,文件防篡改,日志监控,数据可视化,web ssh,堡垒机,指令下发批量执行,linux面板,探针,故障告警
Stars: ✭ 2,669 (+1158.96%)
Mutual labels:  prometheus
Microservice Scaffold
基于Spring Cloud(Greenwich.SR2)搭建的微服务脚手架(适用于在线系统),已集成注册中心(Nacos Config)、配置中心(Nacos Discovery)、认证授权(Oauth 2 + JWT)、日志处理(ELK + Kafka)、限流熔断(AliBaba Sentinel)、应用指标监控(Prometheus + Grafana)、调用链监控(Pinpoint)、以及Spring Boot Admin。
Stars: ✭ 211 (-0.47%)
Mutual labels:  prometheus
Prometheus Es Exporter
Prometheus Elasticsearch Exporter
Stars: ✭ 184 (-13.21%)
Mutual labels:  prometheus
Sql exporter
Flexible SQL Exporter for Prometheus
Stars: ✭ 194 (-8.49%)
Mutual labels:  prometheus
Prometheus Config
Prometheus config for Alerta
Stars: ✭ 197 (-7.08%)
Mutual labels:  prometheus
Ssl exporter
Exports Prometheus metrics for SSL certificates
Stars: ✭ 211 (-0.47%)
Mutual labels:  prometheus
Docker Prometheus Swarm
Sample prometheus that can be used as a sample to get Swarm cluster metrics
Stars: ✭ 210 (-0.94%)
Mutual labels:  prometheus

PromHouse

Build Status codecov Go Report Card CLA assistant

PromHouse is a long-term remote storage with built-in clustering and downsampling for 2.x on top of ClickHouse. Or, rather, it will be someday. Feel free to like, share, retweet, star and watch it, but do not use it in production yet.

Database Schema

CREATE TABLE time_series (
    date Date CODEC(Delta),
    fingerprint UInt64,
    labels String
)
ENGINE = ReplacingMergeTree
    PARTITION BY date
    ORDER BY fingerprint;

CREATE TABLE samples (
    fingerprint UInt64,
    timestamp_ms Int64 CODEC(Delta),
    value Float64 CODEC(Delta)
)
ENGINE = MergeTree
    PARTITION BY toDate(timestamp_ms / 1000)
    ORDER BY (fingerprint, timestamp_ms);
SELECT * FROM time_series WHERE fingerprint = 7975981685167825999;
┌───────date─┬─────────fingerprint─┬─labels─────────────────────────────────────────────────────────────────────────────────┐
│ 2017-12-31 │ 7975981685167825999 │ {"__name__":"up","instance":"promhouse_clickhouse_exporter_1:9116","job":"clickhouse"} │
└────────────┴─────────────────────┴────────────────────────────────────────────────────────────────────────────────────────┘
SELECT * FROM samples WHERE fingerprint = 7975981685167825999 LIMIT 3;
┌─────────fingerprint─┬──timestamp_ms─┬─value─┐
│ 7975981685167825999 │ 1514730532900 │     0 │
│ 7975981685167825999 │ 1514730533901 │     1 │
│ 7975981685167825999 │ 1514730534901 │     1 │
└─────────────────────┴───────────────┴───────┘

Time series in Prometheus are identified by label name/value pairs, including __name__ label, which stores metric name. Hash of those pairs is called a fingerprint. PromHouse uses the same hash algorithm as Prometheus to simplify data migration. During the operation, all fingerprints and label name/value pairs a kept in memory for fast access. The new time series are written to ClickHouse for persistence. They are also periodically read from it for discovering new time series written by other ClickHouse instances. ReplacingMergeTree ensures there are no duplicates if several ClickHouses wrote the same time series at the same time.

PromHouse currently stores 24 bytes per sample: 8 bytes for UInt64 fingerprint, 8 bytes for Int64 timestamp, and 8 bytes for Float64 value. The actual compression rate is about 4.5:1, that's about 24/4.5 = 5.3 bytes per sample. Prometheus local storage compresses 16 bytes (timestamp and value) per sample to 1.37, that's 12:1.

Since ClickHouse v19.3.3 it is possible to use delta and double delta for compression, which should make storage almost as efficient as TSDB's one.

Outstanding features in the roadmap

  • Downsampling (become possible since ClickHouse v18.12.14)
  • Query Hints (become possible since prometheus PR 4122, help wanted issue #24)

SQL queries

The largest jobs and instances by time series count:

SELECT
    job,
    instance,
    COUNT(*) AS value
FROM time_series
GROUP BY
    visitParamExtractString(labels, 'job') AS job,
    visitParamExtractString(labels, 'instance') AS instance
ORDER BY value DESC LIMIT 10

The largest metrics by time series count (cardinality):

SELECT
    name,
    COUNT(*) AS value
FROM time_series
GROUP BY
    visitParamExtractString(labels, '__name__') AS name
ORDER BY value DESC LIMIT 10

The largest time series by samples count:

SELECT
    labels,
    value
FROM time_series
ANY INNER JOIN
(
    SELECT
        fingerprint,
        COUNT(*) AS value
    FROM samples
    GROUP BY fingerprint
    ORDER BY value DESC
    LIMIT 10
) USING (fingerprint)
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].