ripienaar/gdash — pull request #33 by keymon (2012-03-18 22:48:47+00:00)
Title: Added support for extra properties that can be defined in the dash.yaml 

using the key ':graph_properties'. These properties can be and used in
the graphs as normal ruby code.

Example::

:name: Java core metrics.
:description: Different java process metrics.
:graph_properties:
:environment: dev
:servers: [ server1, server2, server3, server4 ]

And in the Graph:

title "Heap memory for #{environment} machines"
timezone "Europe/London"
vtitle "size"
linewidth 2
linemode "connected"
description "Java Memory Usage in all machines in #{environment}"

field :heapmax, :alias => "Heap Max",
:data => "sumSeries(servers.java.caspercore.#{environment}.#{servers[0]}.jvm-heap.HeapMemoryUsage_max)"

servers.each do |servername|
field "heap_used_#{servername}".to_sym,
:alias => "Heap Used #{servername}",
:data => "servers.java.caspercore.#{environment}.#{servername}.jvm-heap.HeapMemoryUsage_used"
end