ccin2p3 / samplerr

Round robin timeseries middleware based on riemann and elasticsearch
Eclipse Public License 1.0
15 stars 4 forks source link

add a filtered alias to avoid overlapping of events over two periods #1

Open samplerr opened 8 years ago

samplerr commented 8 years ago

Given the following archives:

[{:tf "YYYY.MM.dd" :step (t/seconds 20) :ttl   (t/days 2) :cfunc cfunc}
 {:tf "YYYY.MM"    :step (t/minutes 10) :ttl (t/months 2) :cfunc cfunc}
 {:tf "YYYY"       :step    (t/hours 1) :ttl (t/years 10) :cfunc cfunc}]

and the following aliases:

samplerr-2016.03.17 → .samplerr-2016.03.17
samplerr-2016.03.16 → .samplerr-2016.03

When the client queries the metrics over two days from 2016.03.16 to 2016.03.17, the results from the latter period will contain both events from .samplerr-2016.03.17 and from .samplerr-2016.03. High (20s) resolution data will be mixed with lower (600s) resolution.

Proposed fix: set up a filtered alias instead, that will limit the month 2016.03 from day 01 to day 16

smortex commented 4 years ago

I did a proof of concept in ruby here: https://github.com/opus-codium/maintain-samplerr-data

Works well…

I'll try to turn this into Clojure and propose a PR to improve aliases management in samplerr :yum: