input { # https://www.elastic.co/guide/en/logstash/current/plugins-inputs-jdbc.html jdbc { jdbc_driver_library => "/usr/share/logstash/mysql-connector-java-8.0.22.jar" jdbc_driver_class => "com.mysql.jdbc.Driver" jdbc_connection_string => "jdbc:mysql://mysql:3306/temp_db" jdbc_user => "system" jdbc_password => "admin123" sql_log_level => "debug" use_column_value => true tracking_column => "ts" tracking_column_type => "numeric" schedule => "*/5 * * * * *" statement_filepath => "/usr/share/logstash/sql/sync_temp_table.sql" } } # https://www.elastic.co/guide/en/logstash/current/filter-plugins.html+ filter { mutate { remove_field => ["@version", "@timestamp", "ts"] } } output { # https://www.elastic.co/guide/en/logstash/current/plugins-outputs-elasticsearch.html elasticsearch { hosts => "elasticsearch:9200" user => "elastic" password => "changeme" ecs_compatibility => disabled index => "temp_index" document_id => "%{id}" } }