Ruby SyntaxError - unexpected tCONSTANT


(Sharon Sasporta) #1

Hi,

That is my error I am getting when Logstash start:

error: (SyntaxError) (ruby filter code):15: syntax error, unexpected tCONSTANT
event.set('NonPrimeTimeUnavailabilityinPrecentage, ((event.get('NonPrimeTimeUnavailabilityinSeconds').to_f * 100 ) / ( 365 * 15 * 3600 )))

The source is:

                  event.set('BusinessTimeUnavailabilityPrecentage', ((event.get('BusinessTimeUnavailabilityinSeconds').to_f * 100 ) / ( 365 * 15 * 3600 )))
                  event.set('NonPrimeTimeUnavailabilityinPrecentage, ((event.get('NonPrimeTimeUnavailabilityinSeconds').to_f * 100 ) / ( 365 * 15 * 3600 )))

What is wrong here?

Regards,
Sharon.


#2

You are missing the closing quote around NonPrimeTimeUnavailabilityinPrecentage.


(system) closed #3

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