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

Aggregation of specific tag combinations #7

Closed
tsuna opened this issue Jan 23, 2011 · 1 comment
Closed

Aggregation of specific tag combinations #7

tsuna opened this issue Jan 23, 2011 · 1 comment

Comments

@tsuna
Copy link
Member

tsuna commented Jan 23, 2011

Right now if you specify tag=v1|v2 you always get two lines, one for v1 and one for v2. It would be nice to be able to specify specific tag combinations but still have them be aggregated. So sum:foo{tag=v1|v2} would somehow still produce a single line, the sum of foo{tag=v1} and foo{tag=v2}. We'd need some way to express this in a query.

It was suggested on the mailing list to use a semicolon to separate tag values that need to be aggregated together. Quoting the email:

On Sat, Jan 22, 2011 at 3:17 PM, pgillan wrote:

As far as the syntax goes, my thought was that you wouldn't
necessarily need a ${MAGIC} variable, you could just use a different
delimeter between the tags to represent how the tags should be
graphed. m=avg:cpu{server_id=server1|server2|server3} would result in
three distinct lines, while
m=avg:cpu{server_id=server1;server2;server3} would give you a single
line that represented all three server, where the avg could also be
sum.  That also opens up the possibility of doing
m=avg:cpu{server_id=server1;server2|server3;server4}, which would give
you two lines, one that was the average of server1 and server2, and
another that was the average of server3 and server4.  I don't think
there'd be issues with precedence as long as ; is always processed
before |.  Note that I like + better than ;, but + in urls get
interpreted as spaces, so it probably wouldn't work right.

jzeeck added a commit to jzeeck/opentsdb that referenced this issue Aug 26, 2014
Set the width and qualifier constants on the UniqueIdType enum and do id...
@manolama
Copy link
Member

Done in 2.2 where the tags are now group-by or not-group by.

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

2 participants