Getting ruby exception

Hi,

I am getting error:

SyntaxError: (ruby filter code):3: syntax error, unexpected tIDENTIFIER
                                        logInfo = event.get('wmcode').split('.').last

I am using below filter:

ruby 
		{
			code => "
					apptemp = event.get('wmcode').split('.').first
					event.set('app' , apptemp[1..apptemp.length])
						
					logInfo = event.get('wmcode').split('.').last
					event.set('logLevel' , logInfo[logInfo.length-2..logInfo.length-2])
			"
		}

Please help!

I managed to remove this error but getting another error now:

[DEBUG][logstash.pipeline ] Pushing flush onto pipeline {:pipeline_id=>"main", :thread=>"#<Thread:0x4d39463@C:/Elk/logstash-6.0.0/logstash-core/lib/logstash/pipeline.rb:290 sleep>"}

It is not an error, it is a DEBUG log message.

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