Ruby SyntaxError - unexpected tCONSTANT

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.

You are missing the closing quote around NonPrimeTimeUnavailabilityinPrecentage.

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