Fetch the value of a variable in logstash file

I'm trying to execute this code inside the filter block of ruby code.

filter {
ruby {
code => "
test1= Amount

puts key1='map_' +test1.to_s + 'RULE' + test2.to_s + 'RANGE' + test3.to_s + '_MIN'

Created a variable 'map_Amount_2_RANGE_4_MIN' using above mechanism
and the value of this variable is given in ksh file

Now I want to print the value of 'map_Amount_2_RANGE_4_MIN' in cof file ,How to print the value .
I just tried
puts key1
but it's not working.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.