Hi,
I want to add the size in Bytes of a message to as an attribute of that message, is this possible? I have seen a some try this before with the ruby plugin, but I have been unable to get this to work.
Thanks in advance!
Hi,
I want to add the size in Bytes of a message to as an attribute of that message, is this possible? I have seen a some try this before with the ruby plugin, but I have been unable to get this to work.
Thanks in advance!
Try this one
filter {
ruby {
code => "event.set('message_size', event.get('message').bytesize)"
}
}
Thanks a ton, I was working with length and I couldn't get it to work. This works perfectly.
This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
© 2020. All Rights Reserved - Elasticsearch
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant logo are trademarks of the Apache Software Foundation in the United States and/or other countries.