morellon/rrd-ffi — Issue #12: Variable as datasource name
Author: cimm
Created: 2012-01-17 09:28:09+00:00
State: open

Hi Thiago,

While checking the fix you released I ran in another problem... It seems you can't assign a datasource with a variable.

rrd.create :start => start_time, :step => 10.minutes do
datasource some_var, :type => :gauge, :heartbeat => 15.minutes, :min => 0, :max => 100
archive :average, :every => 20.minutes, :during => 1.month
end

The `some_var` in the example is the problem. Everything works fine as long as it is a string but once I replace it with a variable he won't create the RRD file anymore:

Invalid DS name

I traced back the problem to the builder in the gem. I suppose the `builder.instance_eval` does something weird with the variable.