vimeo / graph-explorer

A graphite dashboard powered by structured metrics
http://vimeo.github.io/graph-explorer/
Apache License 2.0
1.06k stars 93 forks source link

incorrect "Couldn't parse query: 'group by' (target_type=, unit=, server), 'sum by ()' and 'avg by (server)' cannot list the same tag keys " when using buckets #58

Closed Dieterbe closed 10 years ago

Dieterbe commented 10 years ago

`swift_proxy_server GET timing 200 object median group by server:dfvimeo|lvim avg by server avg over 10M"

-->

Couldn't parse query: 'group by' (target_type=, unit=, server), 'sum by ()' and 'avg by (server)' cannot list the same tag keys
Traceback (most recent call last):
File "/opt/graph-explorer/app.py", line 390, in render_graphs
query = Query(query)
File "/opt/graph-explorer/query.py", line 26, in __init__
self.parse(query_str)
File "/opt/graph-explorer/query.py", line 92, in parse
(', '.join(self['group_by'].keys()), ', '.join(self['sum_by'].keys()), ', '.join(self['avg_by'].keys())))
Exception: 'group by' (target_type=, unit=, server), 'sum by ()' and 'avg by (server)' cannot list the same tag keys 

when using buckets, this should be allowed. the first bucket catches 2 diff. values of server, the other one about 10. they should each avg by server, after doing the group by server with the buckets.

Dieterbe commented 10 years ago

fixed in 49560ea086811665bc13182f7e940588933f9fc8