Hi all,
When I create a conf file with jdbc input, the data go to all my indexes.
For example I did two conf files with jdbc input :
input {
jdbc {
jdbc_connection_string => "jdbc:postgresql://localhost:5432/postgres"
jdbc_user => "user"
jdbc_password => "password"
jdbc_driver_library => "/path_to_postgre_jar/postgresql-9.2-1004.jdbc3.jar"
jdbc_driver_class => "org.postgresql.Driver"
schedule => "30 * * * * *"
statement => "select id_temp_index, nom, prenom, sexe, age from temp_index"
}
}
filter { }
output {
elasticsearch {
index => "index_sql_1"
document_type => "type_01"
hosts => ["localhost:9200"]
document_id => "%{id_temp_index}"
}
}
and
input {
jdbc {
jdbc_connection_string => "jdbc:postgresql://localhost:5432/postgres"
jdbc_user => "user"
jdbc_password => "password"
jdbc_driver_library => "/path_to_postgre_jar/postgresql-9.2-1004.jdbc3.jar"
jdbc_driver_class => "org.postgresql.Driver"
schedule => "30 * * * * *"
statement => "select id_temp_index as id_temp_index_2, nom as nom_2, prenom as prenom_2, sexe as sexe_2, age as age_2 from temp_index"
}
}
filter{ }
output {
elasticsearch {
protocol => http
index => "index_sql_2"
document_type => "type_2"
hosts => ["localhost:9200"]
document_id => "%{id_temp_index_2}"
}
}
So I should have two indexes quite identical exept the name of the columns with 5 fields and I got :
So, each index got the fields of each conf and one line come from the other.
Those lines appears in all indexes I will create, even csv input, beats input...
And it can replace some data if the document_id is somehting like document_id => "%{id}" in several conf files.
So, did I miss something in my conf files? Is there a way to prevent that?