Je voudrais exporter la table de tom_test2 postgresql à la recherche élastique. Le tableau a 176805 lignes:logstach: jdbc_page_size ne jette pas toutes mes données à la recherche élastique
=> select count(*) from tom_test2;
count
--------
176805
(1 row)
Le fichier logstach conf suivant importation correctement mes données à la recherche élastique:
input {
jdbc {
# Postgres jdbc connection string to our database, mydb
jdbc_connection_string => "xxx"
# The user we wish to execute our statement as
jdbc_user => "xxx"
jdbc_password => "xxx"
# The path to our downloaded jdbc driver
jdbc_driver_library => "xxx"
# The name of the driver class for Postgresql
jdbc_driver_class => "org.postgresql.Driver"
# our query
statement => "select * from tom_test2"
}
}
output {
elasticsearch {
hosts => ["xxx"]
index => "tom"
document_type => "tom_test"
}
}
A la recherche élastique:
GET tom/tom_test/_search
"hits": {
"total": 176805,
"max_score": 1,
}
je supprime mon index en recherche élastique:
delete tom
Et maintenant je voudrais faire la même opération en utilisant jdbc_page_size dans le cas où mes données devient plus grand, mon fichier logstach conf est maintenant:
input {
jdbc {
# Postgres jdbc connection string to our database, mydb
jdbc_connection_string => "xxx"
# The user we wish to execute our statement as
jdbc_user => "xxx"
jdbc_password => "xxx"
# The path to our downloaded jdbc driver
jdbc_driver_library => "xxx"
# The name of the driver class for Postgresql
jdbc_driver_class => "org.postgresql.Driver"
# our query
statement => "select * from tom_test2"
jdbc_page_size => 1000
jdbc_paging_enabled => true
}
}
output {
elasticsearch {
hosts => ["xxx"]
index => "tom"
document_type => "tom_test"
}
}
Mon compte est maintenant mal:
GET tom/tom_test/_search
"hits": {
"total": 106174,
"max_score": 1,
}
comme 176805 -106174 = 70631 lignes sont manquantes
Tous les journaux en logstash ou ElasticSearch? Une raison pour définir une taille de page aussi petite? (par défaut est 100000) –
Je seconde le commentaire de Julien, plus d'infos? – Val