I am using geoip plugin to geo code IP, but sometimes, event are coming with a wrong IP then geoip plugin throws error then nothing is output
Is it possible to silent error for specified plugins?
Thanks,
I am using geoip plugin to geo code IP, but sometimes, event are coming with a wrong IP then geoip plugin throws error then nothing is output
Is it possible to silent error for specified plugins?
Thanks,
You could wrap the geoip filter in a conditional block and skip it unless the field looks like an IP address.
Yes, it was I finally done:
ruby
{
init => "require 'resolv'"
code => "event['valid_ip'] = !!(event['ip'] =~ Resolv::IPv4::Regex)"
}
© 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.