Method: Nosey::Munin::Graph#configure

Defined in:
lib/nosey/munin.rb

#configureObject

Munin calls this to setup the title and labels for the chart graph_title THE TITLE OF YOUR GRAPH graph_category THE CATEGORY / GROUP OF YOUR GRAPH graph_vlabel Count total.label Total other.label Other



43
44
45
46
47
48
49
50
51
52
53
54
55
# File 'lib/nosey/munin.rb', line 43

def configure
  body = StringIO.new
  body.puts "graph_title #{title}"
  body.puts "graph_category #{category}"
  body.puts "graph_vlabel #{vertical_label}"
  
  (@labels || {}).each do |field, label|
    body.puts "#{field}.label #{label}"
  end
  
  body.rewind
  body.read
end