TimeScale
约 2 分钟阅读
- 适用于
- 需要时序数据存储
- 不适用于
- 监控
- Metrics
- promscale 停止开发 promscale#1836GitHub Issuetimescale/promscale#1836
- TimeScaleLinkwww.timescale.com适用于 · 需要时序数据存储 · 不适用于 · 监控 · Metrics · promscale 停止开发 promscale#1836 · timescale/timescaledb · Apache-2.0 · An open-source time-series database optimized for fast ingest and com...笔记:TimeScale
- timescale/timescaledbGitHubtimescale/timescaledb适用于 · 需要时序数据存储 · 不适用于 · 监控 · Metrics · promscale 停止开发 promscale#1836 · timescale/timescaledb · Apache-2.0 · An open-source time-series database optimized for fast ingest and com...笔记:TimeScale
- Apache-2.0
- An open-source time-series database optimized for fast ingest and complex queries. Engineered up from PostgreSQL, packaged as an extension.
- data retention policies
- continuous aggregate views
- downsampling
- data gap-filling
- interpolation
- 参考
- Problems with PostgreSQL 10 for time-series data
- Building a distributed time-series database on PostgreSQL
- timescale/pg_prometheusGitHubtimescale/pg_prometheus - timescale/prometheus-postgresql-adapterGitHubtimescale/prometheus-postgresql-adapter
- PostgreSQL extension for Prometheus data
- 不再使用该结构
- timescale/timescale-prometheusGitHubtimescale/timescale-prometheus主流方式 · Remote API · Sidecar 上传 Chunk 做长期 + Sidecar 请求 Prometheus 查看实时 · m3db/m3 · 分布式 TSDB,聚合查询引擎 · Prometheus Sidecar, Graphite Compatible, Metrics Platform笔记:Prometheus 存储
- prometheus 交互新的架构
- 作为 RemoteStorage
- prometheus remote_write
- docs.timescaledb.com/using-timescaledb/telemetry
timescaledb.telemetry_level=offALTER [SYSTEM | DATABASE | USER] { *db_name* | *role_specification* } SET timescaledb.telemetry_level=off
- timescale/timescaledb#638GitHub Issuetimescale/timescaledb#638 - List of recommended ZFS/Zpool settings
# 基于 postgres 上游构建的镜像
# https://github.com/timescale/timescaledb-docker
# timescale/timescaledb-postgis 包含 postgis 扩展
docker run --rm -it \
-p 5432:5432 \
-v $PWD/data:/var/lib/postgresql/data \
-e POSTGRES_DB=timescale \
-e POSTGRES_USER=timescale \
-e POSTGRES_PASSWORD=timescale \
--name timescaledb timescale/timescaledb:latest-pg12
# http://localhost:9201/metrics
# -log-level 默认 debug
# -async-acks 在写入到数据库之前响应 - 可能丢但 metric 场景下一般不影响
docker run --rm -it --link timescaledb:db \
-p 9201:9201 \
--name ts-prometheus timescale/timescale-prometheus \
-async-acks \
-db-host=db -db-name=timescale -db-port=5432 -db-user=timescale -db-password=timescale
prometheus --config.file=prometheus.ymlprometheus.yml
global:
scrape_interval: 15s
scrape_configs:
- job_name: 'prometheus'
static_configs:
- targets: ['localhost:9090']
- job_name: 'node'
static_configs:
- targets: ['localhost:9100']
- job_name: 'tsdb-prom'
static_configs:
- targets: ['localhost:9201']
remote_write:
- url: 'http://localhost:9201/write'
remote_read:
- url: 'http://localhost:9201/read'Notes
- create_hypertable
- chunk_time_interval=7d
- partitioning_column
- number_partitions - 基于 partitioning_column 的 hash 分片
- associated_schema_name=
_timescaledb_internal - associated_table_prefix=
_hyper - replication_factor=timescaledb.hypertable_replication_factor_default
- docs.timescale.com/api/latest/hypertable/create_hypertable
SELECT create_hypertable('samples', 'ts', chunk_time_interval => INTERVAL '7 day');
select chunks_detailed_size('samples');
select * from timescaledb_information.chunks;Direct Columnstore Insert
SET timescaledb.enable_direct_compress_insert = true;
SET timescaledb.enable_direct_compress_copy = true;关联信息
反向链接、本文链接的其他页面和外部资料。
反向链接
- Database Awesome笔记 · timescale
| name | stand for | · | Relational DBMS | 关系型数据库 | · | Key-value stores | KV 存储 | · | Document stores | 文档存储 | · | Time Series DBMS | 时序数据库 |
References
GitHub6 条
- timescale/pg_prometheusgithub.com/timescale/pg_prometheus
- timescale/prometheus-postgresql-adaptergithub.com/timescale/prometheus-postgresql-adapter
- timescale/promscale#1836github.com/timescale/promscale/issues/1836
- timescale/timescale-prometheusgithub.com/timescale/timescale-prometheus
- timescale/timescaledbgithub.com/timescale/timescaledb
- timescale/timescaledb#638github.com/timescale/timescaledb/issues/638
其他外链9 条
- blog.timescale.com/blog/building-a-distributed-time-series-database-on-postgresqlblog.timescale.com/blog/building-a-distributed-time-series-database-on-postgresql
- blog.timescale.com/time-series-data-postgresql-10-vs-timescaledb-816ee808bac5blog.timescale.com/time-series-data-postgresql-10-vs-timescaledb-816ee808bac5
- docs.timescale.com/api/latest/hypertable/create_hypertabledocs.timescale.com/api/latest/hypertable/create_hypertable
- docs.timescale.com/introduction/architecturedocs.timescale.com/introduction/architecture
- docs.timescale.com/use-timescale/latest/hypertablesdocs.timescale.com/use-timescale/latest/hypertables
- docs.timescaledb.com/using-timescaledb/telemetrydocs.timescaledb.com/using-timescaledb/telemetry
- prometheus.io/docs/prometheus/latest/configuration/configurationprometheus.io/docs/prometheus/latest/configuration/configuration
- www.tigerdata.com/docs/build/data-management/write-data/insertwww.tigerdata.com/docs/build/data-management/write-data/insert
- www.timescale.comwww.timescale.com/