Hi, I've created a logstash to filter a log and output a single message. Then I want to split that message into several fields. What filter plugin should I use? I try to use split filter and it doesn't work
The example messege
"etc." does not tell us enough. Do you want a string broken into 9 character chunks which are then split into two fields of 4 and 5 characters? If so, ruby and .scan look like a good way to go. But the nature of .scan is that you get arrays of arrays, so you may need to rearrange them. See here and here.
Please do not post pictures of text, just post the text, they are impossible to search, some people will be unable to view them, and we cannot copy and paste information to try and reproduce and diagnose the problem.
.scan take a regexp, so you need // around the regexp
Not sure why you have added () to create a capture group when that pattern only matches one thing.