Is there a way to set up custom retention rules on a per metric basis?

58 views
Skip to first unread message

Ruairi

unread,
Jan 24, 2019, 8:48:56 AM1/24/19
to Prometheus Users
Hi All,

Currently I am working with a Prometheus -> TimescaleDB stack for long term storage. We make use of a few custom down-time metrics for SLA reporting.
For long term storage, I am not interested in keeping all metrics collected (eg; node_exporter), just the custom metrics. 
I do not see a way to retain on a per-metric basis but thought I would confirm. At the moment we just have an SQL job that removes everything from the database aside from the custom metrics, but this doesn't seem optimal.

Is there a way to perhaps configure either of the following?

1) Only push certain metrics to TimescaleDB, so only push the custom metrics to the remote end-point.
2) Custom retention periods per metric, so discard select metrics of no interest after X time.


Cheers,
Ruairi


Brian Brazil

unread,
Jan 24, 2019, 8:52:22 AM1/24/19
to Ruairi, Prometheus Users
On Thu, 24 Jan 2019 at 13:48, Ruairi <ruairisc...@gmail.com> wrote:
Hi All,

Currently I am working with a Prometheus -> TimescaleDB stack for long term storage. We make use of a few custom down-time metrics for SLA reporting.
For long term storage, I am not interested in keeping all metrics collected (eg; node_exporter), just the custom metrics. 
I do not see a way to retain on a per-metric basis but thought I would confirm. At the moment we just have an SQL job that removes everything from the database aside from the custom metrics, but this doesn't seem optimal.

Is there a way to perhaps configure either of the following?

1) Only push certain metrics to TimescaleDB, so only push the custom metrics to the remote end-point.

You'll want a keep action for the ones you want to keep.
 
2) Custom retention periods per metric, so discard select metrics of no interest after X time.

This isn't easily possible.

Brian
 


Cheers,
Ruairi


--
You received this message because you are subscribed to the Google Groups "Prometheus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to prometheus-use...@googlegroups.com.
To post to this group, send email to promethe...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-users/eacc91e9-7bdf-4d68-b3cd-c993191f0e50%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


--

Ben Kochie

unread,
Jan 25, 2019, 3:21:18 AM1/25/19
to Ruairi, Prometheus Users
We have an issue to track this feature request: https://github.com/prometheus/prometheus/issues/1381

m...@timescale.com

unread,
Dec 2, 2020, 1:56:43 PM12/2/20
to Prometheus Users
Just wanted to send an update that setting "Custom retention periods per metric." is now possible on the Promscale/TimescaleDB side.

--
Mat Arye, Promscale Team Lead
Reply all
Reply to author
Forward
0 new messages