我刚刚发现我的logtash总是每10秒运行一次查询set sql_mode='no_engine_substitution,strict_trans_tables'
。
我发现用户api_elastics
总是在mysql日志历史记录中每10秒钟运行一次该查询。
这是我的配置:
# Sample Logstash configuration for creating a simple
# Beats -> Logstash -> Elasticsearch pipeline.
input {
jdbc {
jdbc_driver_library => "/etc/mysql-connector/mysql-connector-java-5.1.46/mysql-connector-java-5.1.46-bin.jar"
jdbc_driver_class => "com.mysql.jdbc.Driver"
jdbc_connection_string => "jdbc:mysql://asdasdf:3306/ddd"
jdbc_user => "api_elastics"
jdbc_password => "{asdf"
schedule => "*/10 * * * * *"
statement => "SELECT * FROM tokdis.view_product_autosuggest"
clean_run => true
}
}
filter {
mutate {
convert => {
"price" => "integer"
}
}
}
output {
elasticsearch {
hosts => ["https://asdfasdf.comm:443"]
index => "search_suggestion"
document_id => "%{id}"
}
stdout { codec => rubydebug }
}
我不知道如何禁用此设置。
对此有什么解决办法吗?