Is it possible to enable paging in Logstash jdbc input without tracking_column?


#1

Hi,

I am using ELK GA 5.0.0. I am using Logstash to fetch rows from my Postgres db like;

jdbc {
	jdbc_driver_library => "/ELK/Logstash/edb-jdbc17.jar"
	jdbc_driver_class => "Java::com.edb.Driver"
	jdbc_connection_string => "jdbc:edb://192.168.0.1:5432/table01"
	jdbc_user => "table01"
	jdbc_password => "table01"
	schedule => "0 * * * *"
	statement => "SELECT columna, columnb, columnc FROM testtable where time_column Between to_date((to_char(current_timestamp-2/24, 'DD-MON-YYYY HH24') || ':00:00'), 'DD-MON-YYYY HH24:MI:SS') and to_date((to_char(current_timestamp-2/24, 'DD-MON-YYYY HH24') || ':59:59'), 'DD-MON-YYYY HH24:MI:SS')"
	jdbc_validation_timeout => "300"
}

There is no such field like aa auto increment field here. I do have a time feld. I would like to enable paging. Is this possible? How can I do this?


(Guy Boertje) #2

Have you tried https://www.elastic.co/guide/en/logstash/current/plugins-inputs-jdbc.html#plugins-inputs-jdbc-jdbc_paging_enabled?


#3

Hi @guyboertje thats what I was asking. Is is possible to enable this without a tracking_column.


(Guy Boertje) #4

Yes. Paging is done independently of a tracking column.


(system) #5

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