jamessanford / remote-tsdb-clickhouse

A remote writer/reader for Prometheus that stores TSDB data in ClickHouse
Apache License 2.0
32 stars 13 forks source link

Return sampled data in read requests when Hints.StepMs is present #2

Closed jamessanford closed 1 year ago

jamessanford commented 1 year ago

When plotting graphs, Prometheus or Grafana may suggest returning a data point for every StepMs instead of all data points.

This hint significantly speeds up drawing graphs, as only a fraction of the timeseries data actually needs to be sent.

If you don't want this optimization, use -read.ignore-step to ignore Hints.StepMs

NOTE: With StepMs hinting the Prometheus "query_range" endpoint sometimes returns no data points, even though it asked us for data and we supplied it.