elasticsearch Logstash错误:拒绝对[db]的映射更新,因为最终映射将有多个类型:[meeting_invities,meetingroom";}}
下面是我的logstatsh-mysql.conf,我必须在jdbc输入中使用多个表。请告知elasticsearch Logstash错误:拒绝对[db]的映射更新,因为最终映射将有多个类型:[meeting_invities,meetingroom";}},elasticsearch,logstash,elasticsearch,Logstash,下面是我的logstatsh-mysql.conf,我必须在jdbc输入中使用多个表。请告知 Rejecting mapping update to [db] as the final mapping would have more than 1 type: [meeting_invities, meetingroom "}}}} elasticsearch输出使用带有两个不同值的选项document\u type,该选项设置索引的\u type字段,因为版本6.X中的索引中只能有一种类型 该
Rejecting mapping update to [db] as the final mapping would have more than 1 type: [meeting_invities, meetingroom
"}}}}
elasticsearch输出使用带有两个不同值的选项
document\u type
,该选项设置索引的\u type
字段,因为版本6.X中的索引中只能有一种类型
该选项在7.X版中已被弃用,并将在将来的版本中删除,因为elasticsearch正在运行
由于elasticsearch不允许您索引多个索引类型,因此您需要查看您索引的第一个文档的类型,这是elasticsearch将用于任何未来文档的类型,请在文档\u type
选项中使用
input {
jdbc {
jdbc_connection_string => "jdbc:mysql://localhost:3306/db"
jdbc_user => "root"
jdbc_password => "pwd"
jdbc_driver_class => "com.mysql.jdbc.Driver"
statement => "SELECT * FROM meeting"
tags => "dat_meeting"
}
jdbc {
jdbc_connection_string => "jdbc:mysql://localhost:3306/db"
jdbc_user => "root"
jdbc_password => "pwd"
jdbc_driver_class => "com.mysql.jdbc.Driver"
statement => "SELECT * FROM meeting_invities;"
tags => "dat_meeting_invities"
}
}
output {
stdout { codec => json_lines }
if "dat_meeting" in [tags]{elasticsearch {
hosts => "localhost:9200"
index => "meetingroomdb"
document_type => "meeting"
}
}
if "dat_meeting_invities" in [tags]{elasticsearch {
hosts => "localhost:9200"
index => "meetingroomdb"
document_type => "meeting_invities"
}
}
}