ripienaar / graphite-graph-dsl

A small DSL to describe graphite graphs
http://www.devco.net/
Apache License 2.0
167 stars 43 forks source link

Don't want to be forced to specify field name #51

Closed DrewEaster closed 10 years ago

DrewEaster commented 10 years ago

I'm not sure if I've missed something in the documentation but I'm frustrated that I'm forced to specify a field name in the graph DSL.

In the Graphite Browser, I can use the following graph target:

groupByNode(request.browser.*.rate, 2, 'sumSeries')

The wildcard represents a browser (e.g. Chrome, Safari etc.). In the Graphite Browser the graph is generated with a correctly labelled legend - i.e. one field per browser type.

However, when I use the graph DSL like this:

field :browser, :data => "groupByNode(request.browser.*.rate, 2, 'sumSeries')"

Every item in the legend is named "browser" which is clearly not what I'm after! Is there any workaround to this? Ideally specifying a name for a field would be optional.

DrewEaster commented 10 years ago

Doh. I realise I can use no_alias option. Sorry!