However, this throws an exception: "Ruby exception occurred: not an AF_INET/AF_INET6 sockaddr"
I know that should be working, because I can take a static one liner within irb that I confirmed works, but yet in logstash it will fail with the same exception:
I believe when I'm extracting the string from event.get and then converting it via the pack, the data is being modified to some unicode that is not accurate.
I don't seem to be able to use event.set without it trying to do unicode data.
For that matter, I believe my pack('H*') is resulting in unicode, which I think is the crux of the problem. However, I am unable to figure out why it continues to transpose the data into unicode.
Working straight from ruby results in the expected results, but something within logstash filter of ruby is executing something that isn't representative or straight ruby.
The function call Socket.unpack_sockaddr_in with JRuby does not unpack the same way regular ruby does.
We downloaded the JRuby which apparently differs than the JRuby built with Logstash 6.0.0.
E.g., if you have an saddr of: 02000050D02B66FA0000000000000000
In the specific version of JRuby (NOT regular JRuby which you can download, but the compiled version of Logstash 6.0.0), if you do the same function, you will get a different answer:
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.