Hello together,
I am new in the Elasticsearch Ecosystem. For that reason, I have unfortunately some problems with the syntax of Ruby in Logstash.
I have the following snippet code:
if [Clat] != '' { ruby { code => " if !event['Clat'].to_s.include? "." event['Clat'].to_f event['Clat'] = event['Clat'] * 360 / (4294967296) event['Clat'] = event['Clat'].round(2) else event['Clat'].to_f event['Clat'] = event['Clat'].round(2) end " } }
Other parts of the code are working. The error message is:
Error: Expected one of #, {, } at line 42, column 50 (byte 1145) after filter{
It points on my first line:
if !event['Clat'].to_s.include? "."
Probably, logstash has problems with the ruby syntax.
Do you maybe know where the problem can lie? I googled for the ruby syntax and created with that the corresponding ruby code.
Best regards