ripienaar/graphite-graph-dsl — pull request #9 by tanelj (2012-02-16 09:36:04+00:00)
Title: Added support for %{var} like placholders in graph url (titles, data etc...)

Hi!

I have added support for %{var} like placeholders that allows user to use them anywhere in graph url.

Example usage in config file:

placeholders :host => 'myhost', :country => 'uk'
title 'Data for %{host} (%{country})'

field :first,
:alias => '%{country} max',
:data => '%{host}.countries.%{country}.max'

field :second,
:alias => '%{country} avg',
:data => '%{host}.countries.%{country}.avg'

I have plan to implement and use this functionality in GDash to allow system/dashboard wide placeholders. (Eg country based dashboard that accepts country code as url parameter).