Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- input {
- jdbc {
- jdbc_connection_string => "jdbc:mysql://localhost:3306/elements"
- jdbc_user => "user"
- jdbc_password => "admin"
- jdbc_validate_connection => true
- jdbc_driver_library => "C:/work/Wildfly/wildfly-9.0.2.Final/modules/com/mysql/main/mysql-connector-java-5.1.36.jar"
- jdbc_driver_class => "com.mysql.jdbc.Driver"
- statement_filepath => "query.sql"
- use_column_value => true
- tracking_column => id
- #schedule => "*/3 * * * *"
- clean_run => true
- }
- }
- output {
- elasticsearch {
- index => "emptytest"
- document_type => "history"
- document_id => "%{id}"
- hosts => "localhost"
- }
- }
- if [sourcecell_id] == "NULL" {
- mutate {
- }
- }
- filter {
- ruby {
- code => "
- hash = event.to_hash
- hash.each do |k,v|
- if v == nil
- event.remove(k)
- end
- end
- "
- }
- }
- filter {
- ruby {
- code => "
- hash = event.to_hash
- hash.each do |k,v|
- if v == nil
- event[k] = 0
- end
- end
- "
- }
- }
- ERROR logstash.filters.ruby - Ruby exception occurred: Direct event field references (i.e. event['field'] = 'value') have been disabled in favor of using event get and set methods (e.g. event.set('field', 'value')). Please consult the Logstash 5.0 breaking changes documentation for more details
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement