0

I want to push numeric data from a file to my dashboard.

I am using the following .rb file as job for pushing the data

SCHEDULER.every '30s' do
var = File.open("/dashing/abhi/sample.txt", "r")
var.each_line do |line|
    puts line
send_event('polarion', { value: var })
end
end

but the data is not being displayed in dashboard.

Abhi
  • 1
  • 1
  • The indentation in the example is wrong, but I assume that this is only in this post, not in the original code. If the indentation is correct on your original code, you are passing the file `var` instead of the `line` value to the dashing dashboard on `send_event`. – FedericoG Jul 06 '17 at 15:10

1 Answers1

0

I think this should be:

SCHEDULER.every '30s' do
  var = File.open("/dashing/abhi/sample.txt", "r")
  var.each_line do |line|
    puts line
    send_event('polarion', { value: line })
  end
end
FedericoG
  • 197
  • 8