Skip to content
This repository was archived by the owner on Feb 13, 2025. It is now read-only.

Conversation

@ghost
Copy link

@ghost ghost commented Sep 19, 2018

This PR adds two functions for querying against openTSDB – overQuery and bandQuery. These functions slightly generalise the existing over and band functions to include an end duration parameter eduration, which specifies when a query should end, as is done with q. This enables queries for a historical distribution that does not include recent outliers – related discussion in #2297 .

The existing over and band functions are changed to wrap the more general functions. The undocumented and very related shiftBand function was found during this work, and is added to the documentation.

The third commit f61259a refactors the functions to reuse bandTSDB, as shiftBand used this function to achieve comparable functionality to over.

Tests were written based on the existing function of over, band and shiftBand to ensure same behaviour remains.

…upport end time

Adds more general versions of Over() and Band() that support an eduration
parameter to set the end time of the query, like with q() (#2297)
@kylebrandt
Copy link
Member

cmd/bosun/expr/expr_test.go needs a fmt but other than that I think this good

@ghost
Copy link
Author

ghost commented Sep 21, 2018

Thanks, hadn't spotted the gofmt version differences!

@kylebrandt kylebrandt merged commit c8d22c5 into bosun-monitor:master Sep 24, 2018
@ghost ghost deleted the tsdbhistory branch October 1, 2018 15:59
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant