Hello,
I am currently pushing mysql data to elastic search via the logstash jdbc plugin.
The index gets created and the proper field names (the column names) and data types.
But as soon as I create another .conf file with another mysql source and elastic index. The fields seem to get appended to all the mysql indexes...
Can you see whats wrong with my config ??
input {
jdbc {
jdbc_driver_library => "/etc/logstash/mysql/mysql-connector-java-5.1.39-bin.jar"
jdbc_driver_class => "com.mysql.jdbc.Driver"
jdbc_connection_string => "jdbc:mysql://...:3306/xyz"
jdbc_user => "user"
jdbc_password => "something"
jdbc_fetch_size => 1000
schedule => "* * * * *"
tracking_column => id
use_column_value => true
last_run_metadata_path => "/var/lib/logstash/jdbc_last_run_discussionmsg"
#clean_run => true
#sql_log_level => "debug"
statement => "
select
id,
source,
dateEntry
from
discussionmsg
where
id > 180000000
and id > :sql_last_value
"
}
}
output {
elasticsearch {
hosts => ["localhost:9200"]
index => "discussionmsg-%{+YYYY.MM.dd}"
document_type => "mysql"
}
}
Thanks.