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

support step interpolation #508

Closed
michaelbironneau opened this issue Apr 30, 2015 · 2 comments
Closed

support step interpolation #508

michaelbironneau opened this issue Apr 30, 2015 · 2 comments

Comments

@michaelbironneau
Copy link

We would like to use OpenTSDB to ingest sensor data that arrives on change of value. For example,

sensor.temperature 12:00:00 27.0
sensor.temperature 12:00:01 27.1
sensor.temperature 12:00:30 27.5,

and for us this means that the value 27.1 should be held for 29 seconds (until the next point), not that the temperature increases linearly from 27.1 to 27.5 in this time. How difficult would it be to support this type of interpolation?

Thanks

@michaelbironneau
Copy link
Author

Have thought this through a bit more and it does involve a lot of changes, unless I'm missing something:

  • 'upsampling' in addition to 'downsampling', i.e. the downsampler should use the last datapoint before the interval and the next datapoint after the interval to work out the value during the interval.
  • If doing a query on an interval that contains no datapoints, need to do a lookback to find the previous datapoint and include that instead of returning nothing. This probably involves a 'lookback' parameter similar to the last_dp feature.
  • Implement a custom zero-order-hold mean aggregator that does a weighted average of the points in the interval (the weights are how long the values are held for).

Have looked through the source code and have an idea of how to implement these but they're probably best broken up into separate issues/PRs and will almost definitely need some discussion, so will post to the mailing list instead.

@ranjitreddy2013
Copy link

I'm curious if this was implemented in openTSDB. We need this feature for our use case.

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

No branches or pull requests

2 participants