Logstash JDBC query for LIKE operator

Hi guys, I have a jdbc static query like this:

local_lookups => [
        query => "select * from servers WHERE ip LIKE  = '%:ip%'"
        parameters => {ip => "[from_ip]"}
        target => "server"

I want to search based from field "from_ip" with LIKE operator on my database. Problem is, LIKE operator followed by '%:ip%' can't be run. How to properly use the LIKE operator on jdbc query?


This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.