I find it hard to believe that Logstash goes into a crash loop without any clues in the logs. --debug shouldn't be necessary and might just make it harder to find the interesting parts.
https://www.elastic.co/guide/en/logstash/current/event-api.html documents the event API.
You have two problems in your code:
- Your use of event.set is wrong. See examples in the docs.
- You're closing the event.get call with
}instead of).