ripienaar edited this page Dec 17, 2011 · 17 revisions


This is a DSL that makes it easier for you to create URLs for the Graphite URL API

The point of this is to facilitate the creation of Dashboards and such where you need to interact with the URL API. Your users can describe graphs using the DSL rather than type URLs.

This DSL will eventually have many helper functions that can automatically create complex graphs. For example one line in the graph definition can create a graph with 4 items on it using the Holt Winters Forecast method. More helpers will be added over time. This is significantly simpler than creating these multi element graphs by hand using the normal API.

This DSL is in use in my GDash dashboard where you can describe graphs for display on dashboards using it. Using a framework like this in your dashboard will make it easier to have a consistent look and feel over your graphs, something that is very important in complex visualizations.

A quick example is in order, to create a complex multi part graph like below:


you only need to create a simple description like below:

title          "Male Site Users - Aberration"
vtitle         "users"
from           "-12hours"
hide_legend    true

forecast :male, :data => "sumSeries(*.site.users.male)",
                :alias => "Male",
                :aberration_line => true,
                :aberration_second_y => true

This framework will create the URLs you need to access to produce the graphs.


Basic Graphs:

Graph Item Creation Helpers:


Ruby Usage