Hello All,
I am getting an error which suggests that my if-statement is trying to do a > (greater-than) expression comparison against a null value. When I comment out the if-statement everything works as expected.
Here is the
Here is the error message:
java.lang.NullPointerException: null
[ERROR][org.logstash.execution.WorkerLoop] Exception in pipelineworker, the pipeline stopped processing new events, please check your filter configuration and restart Logstash.
java.lang.NullPointerException: null
netflow.fw_ext_event is an integer, but I still convert it to an integer as a test to validate that I am not doing a greater-than comparison against a text field.
Can anyone please provide some insight into why I am getting the null error?
Thank you!!
I think the problem is that the field [netflow][fw_ext_event] does not exist. I notice that when you add the name you use a period in the name and do not add a field to the netflow object. Should you be referring to netflow.fw_ext_event?
if [netflow][fw_ext_event] != '' {
If the field does not exist then the left hand side is nil, which is not equal to an empty string. The normal way to test for existence is just
You might consider replacing the four == tests with a translate filter. With four tests if else is OK, but if it gets bigger I would definitely consider using translate.
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.