Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for various timeranges associated with ServerGroups #88

Closed
jacksontj opened this issue Oct 11, 2018 · 3 comments
Closed

Add support for various timeranges associated with ServerGroups #88

jacksontj opened this issue Oct 11, 2018 · 3 comments

Comments

@jacksontj
Copy link
Owner

The goal here being to support sending queries to separate stacks of metrics storage based on their "staleness". The prom API unfortunately doesn't expose the StartTime() method from the Storage -- so we'd need to add config options to set a time.Duration offset and duration for each servergroup. Then promxy can add this dimension to its filtering for where to send queries to.

@jacksontj
Copy link
Owner Author

With the more recent rearch inside servergroup this is a trivial add to make, at this point I just need to decide on the config format. I'm thinking having absolute time is probably not useful -- so I'll set it up as relative times. The config formats I'm thinking of now are:

# relative start and end 
time_range:
  start: 3d
  end: 1d

# define only as an offset and duration (offset back from now, duration how much further back)
time_range:
  offset: 1d
  duration: 2d

@jacksontj
Copy link
Owner Author

jacksontj commented Jun 6, 2019

After some more thought, I'm planning on adding 2 time range options:

# for relative offset
relative_time_range:
  start: -3d
  end: -1d

# for an absolute time window
absolute_time_range:
  start: 2009-10-10 23:00:00 +0000 UTC m=+0.000000001
  end: 2009-11-10 23:00:00 +0000 UTC m=+0.000000001

And for both of these if the window is invalid (e.g. start after end) there'll be an error.

jacksontj added a commit that referenced this issue Jun 7, 2019
This adds 2 optional config flags to a servergroup; relative_time_range and absolute_time_range. Both of these provide a way to scope the timerange of a given servergroup such that if a query is outside the time window promxy will not query the given servergroup.

Implements #88
jacksontj added a commit that referenced this issue Jun 7, 2019
This adds 2 optional config flags to a servergroup; relative_time_range and absolute_time_range. Both of these provide a way to scope the timerange of a given servergroup such that if a query is outside the time window promxy will not query the given servergroup.

Implements #88
@jacksontj
Copy link
Owner Author

#162 Implements this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant