Hi; I'm currently running a Logstash server in which I receive messages from various sources. I'd like to find out the the approximate byte-count of each incoming message and attach this as a @metadata field, so I can drop excessively large messages, and monitor the approximate size of incoming messages.
Is this possible to implement using the ruby filter? I tried
code => "event['message_size'] = event.message.length
but it didn't work, as message seems to be an object not a string.
Any help would be appreciated.