On my cockroachDB cluster, the Time Series data grows up to about 1 GByte. Is there any way to decrease it? Thank you!
1 Answers
Yes, you can control this. By default, CockroachDB stores timeseries data for the last 30 days for display in the Admin UI, but you can reduce the interval for timeseries storage or disable timeseries storage entirely.
Reduce the interval for timeseries storage
To reduce the interval for storage of timeseries data, change the timeseries.storage.resolution_10s.ttl
cluster setting to an INTERVAL
value less than 720h0m0s
(30 days). For example, to store timeseries data for the last 15 days, run the following SET CLUSTER SETTING
command:
SET CLUSTER SETTING timeseries.storage.resolution_10s.ttl = '360h0m0s';
Disable timeseries storage entirely
Note: Disabling timeseries storage entirely is recommended only if you exclusively use a third-party tool such as Prometheus for timeseries monitoring. Prometheus and other such tools do not rely on CockroachDB-stored timeseries data; instead, they ingest metrics exported by CockroachDB from memory and then store the data themselves.
To disable the storage of timeseries data entirely, run the following command:
SET CLUSTER SETTING timeseries.storage.enabled = false;
If you want all existing timeseries data to be deleted, change the timeseries.storage.resolution_10s.ttl
cluster setting as well:
SET CLUSTER SETTING timeseries.storage.resolution_10s.ttl = '0s';
Further reference: https://www.cockroachlabs.com/docs/stable/operational-faqs.html#can-i-reduce-or-disable-the-storage-of-timeseries-data

- 373
- 1
- 6
-
Thanks! The usage of the Time Series is getting smaller and smaller over time. – Ueda Takeyuki Oct 04 '19 at 10:19