Module: Nosey::Munin

Defined in:
lib/nosey/munin.rb

Defined Under Namespace

Modules: Argument Classes: Graph

Class Method Summary collapse

Class Method Details

.graph(args = ARGV, out = $stdout, &block) ⇒ Object

Print the output of the munin graph to $stdout



13
14
15
16
17
18
19
20
21
22
23
# File 'lib/nosey/munin.rb', line 13

def self.graph(args=ARGV,out=$stdout,&block)
  dsl = Graph::DSL.new(&block)

  # Munin passes configure into this to figure out the graph.       
  out.puts case args.first
  when Argument::Configuration
    dsl.graph(true).configure
  else
    dsl.graph.sample
  end
end