cmd/bosun: series operations #1672

Merged
merged 1 commit into from Mar 16, 2016

Projects

None yet

3 participants

@kylebrandt
Member

image

@kylebrandt kylebrandt added the bosun label Mar 16, 2016
@kylebrandt kylebrandt cmd/bosun: series operations
5cc71f6
@kylebrandt kylebrandt merged commit 5cc71f6 into master Mar 16, 2016

2 checks passed

bosun All checks Passed!
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@kylebrandt kylebrandt deleted the seriesOp branch Apr 8, 2016
@iamamberkulkarni

Hey we are using bosun version 0.5.0-rc2.
Want to try out series operations so have created an expression as follows:

$a = q("sum:metric_name{filters...}", "7h", "")
$b = q("sum:metric_name{filters...}", "7h", "")
$a/$b

above expression gives the error
expr: parse: type error in q("sum:filter{filters...}", "7h", "") / q("sum:filter{filters...}", "7h", ""): at least one side must be a number

Was trying this out after seeing doc.
Series Operations If you combine two seriesSets with an operator (i.e. q(..) + q(..)), then operations are applied
for each point in the series if there is a corresponding datapoint on the right hand side (RH). A corresponding datapoint is one which has the same timestamp (and normal group subset rules apply). If there is no corresponding datapoint on the left side, then the datapoint is dropped. This is a new feature as of 0.5.0.

Are we doing something wrong here ?
Please help. Thanks.

p.s. have not put actual metrics.

@iamamberkulkarni

Hey used latest code and it works. thanks a ton

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