prometheus-postgresql-adapter icon indicating copy to clipboard operation
prometheus-postgresql-adapter copied to clipboard

how to clean data in timescaledb

Open FunkyYang opened this issue 6 years ago • 1 comments

I hava running this in days,and the db size is too big for me,How can I cut this?

FunkyYang avatar Nov 29 '19 12:11 FunkyYang

If you are using TimescaleDB as well, probably could use something like: https://docs.timescale.com/latest/using-timescaledb/data-retention

If not, put pg_agent and scheduler to set up data retention using delete. I think that is the way to do it. The whole point of using DB as storage is to extend performance and having more reliable source for data retention than Prometheus internal file based storage that has the default retention period of 15 days. There are also ways to filter what Prometheus sends to adapter to cut down the data going to DB.

krisavi avatar Jan 23 '20 09:01 krisavi