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

avg() doesn't work with range selector [] #2048

Closed
zxwing opened this Issue Oct 2, 2016 · 4 comments

Comments

Projects
None yet
3 participants
@zxwing
Copy link

zxwing commented Oct 2, 2016

I use avg() as below expression:

avg(collectd:collectd_virt_memory{virt="ca9718fac1014adeb605c9d72ae81617",type="rss",hostUuid="a456ba03d5944397b76fd8f2dbf9fceb"}[1h])

but get the error:

Error executing query: parse error at char 135: expected type vector in aggregation expression, got matrix

what is the right way to use it? The document doesn't give any example. From my understanding [] is the only range selector

@zxwing zxwing changed the title avg() doesn't work with range selector `[]` avg() doesn't work with range selector [] Oct 2, 2016

@brian-brazil

This comment has been minimized.

Copy link
Member

brian-brazil commented Oct 2, 2016

You want avg_over_time

@zxwing

This comment has been minimized.

Copy link
Author

zxwing commented Oct 2, 2016

@brian-brazil I see, thanks !

@zxwing zxwing closed this Oct 2, 2016

@redbaron

This comment has been minimized.

Copy link
Contributor

redbaron commented Oct 2, 2016

@zxwing, just a note - AFAIK you'll have bad time if you let metrics cardinality grow uncapped. random container names as metrics value is essentially uncapped growth

@lock

This comment has been minimized.

Copy link

lock bot commented Mar 24, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked and limited conversation to collaborators Mar 24, 2019

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
You can’t perform that action at this time.