ES with JDBC Doesn't Pull from lastexecution start


(Michael Li Zhou) #1

I am trying to pull logs that are stored in a Oracle 11g DB, but I am running into a problem where JDBC importer will not pull any logs. What I want to do is pull logs from the DB at certain intervals without getting duplicates. So in the basic script oracle-connection-properties.sh if I do not have any parameters I can pull the entire table. Once I add the parameter to set a time it will no longer pull from the DB. What am I doing wrong?

"sql" : [
{
"statement" : "select * from cw.cwmessagelog where creation_time > ?",
"parameter" : [ "$metrics.lastexecutionstart" ]
}
],
"index" : "myoracle",
"type" : "myoracle",
"elasticsearch" : {
"cluster" : "NJ_datacenter",
"host" : "localhost",
"port" : 9300
},

I am trying to mimic this from the documents:

"sql" : [
            {
                "statement" : "select * from \"products\" where \"mytimestamp\" > ?",
                "parameter" : [ "$metrics.lastexecutionstart" ]
            }
        ],
        "index" : "my_jdbc_index",
        "type" : "my_jdbc_type"
    }

(system) #2