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

[Q] Does aggregation-rule works with tagged metrics? #887

Open
whispererli opened this issue Mar 27, 2020 · 6 comments
Open

[Q] Does aggregation-rule works with tagged metrics? #887

whispererli opened this issue Mar 27, 2020 · 6 comments

Comments

@whispererli
Copy link

Hello all,

I got a question regarding how to apply aggregation rules to tagged metrics.
My test metrics are looking like:
request_count;app=test;api=test1;status_code=400
and my aggregation rule is:
request_count;app=<env>;api=<api>;status_code=<status_code> (60) = sum request_count;app=<\<env>>;api=<\<api>>;status_code=<\<status_code>>
When inject the metrics to carbon-aggregator I got follow errors:
27/03/2020 17:09:37 :: [console] Couldn't match metric request_count;app=test;api=test1;status_code=400 with any aggregation rule. Passing on un-aggregated. 27/03/2020 17:09:37 :: [console] Couldn't match metric request_count;app=test;api=test1;status_code=200 with any aggregation rule. Passing on un-aggregated. 27/03/2020 17:09:37 :: [console] Couldn't match metric request_count;app=test;api=test3;status_code=200 with any aggregation rule. Passing on un-aggregated.
Changed aggregation rule to request_count (60) = sum request_count also not works.
Can't find an example about how to set aggregation rule with tagged metrics. Is there a way to do that? Thanks very much!

@whispererli
Copy link
Author

whispererli commented Mar 27, 2020

So looks like it's not supported, from the function 'build_regex' the above pattern will build to:
request_count;app=(?P<env>[^.]+?);api=<api>;status_code=<status_code> which only replace the first tag...

@stale
Copy link

stale bot commented May 26, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label May 26, 2020
@stale stale bot closed this as completed Jun 2, 2020
@f-michaut
Copy link

f-michaut commented Jun 8, 2020

Hello, I have some tagged series and I'd like to aggregate them.
I couldn't find any exemple to use tagged series with carbon-aggregator, is there a way to do so ?

@deniszh deniszh added pinned and removed stale labels Jun 8, 2020
@deniszh
Copy link
Member

deniszh commented Jun 8, 2020

Unfortunately, as @whispererli found, currently it's not supported.

@deniszh deniszh reopened this Jun 8, 2020
@f-michaut
Copy link

Are you planning to implement this ?

I think it would be verry usefull, as tagged series are verry powerfull. But if we can't agregate them, we will run into some limitations...
For instance, I have a lot of tagged series, and aggregating them at querry time is verry expensive, my dashboard take a lot of time to load. With carbon-aggregator supporting tagged series it wouldn't be a problem at all.

@deniszh
Copy link
Member

deniszh commented Jun 8, 2020

I'm suspecting that would be quite non-trivial task, unfortunately. Worth to try, of course, but not sure that I can do that.

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

3 participants