logstash-plugins/logstash-input-couchdb_changes

Logstash 5.1.1 - error

Closed this issue · 3 comments

Please post all product and debugging questions on our forum. Your questions will reach our wider community members there, and if we confirm that there is a bug, then we can open a new issue here.

For all general issues, please provide the following details for fast resolution:

  • Version: ELK 5.1.1 with couchdb_changes
  • Operating System: LinuxMint 18 x64
  • Config File (if you have sensitive info, please remove it): any config file
input { 
  couchdb_changes {
      db => "mydbname"
      host => "127.0.0.1"
      port => 5984 	
      initial_sequence => 0 #this is only required for the an initial indexing
  }
}
filter {
  mutate {
    add_field => { "action" => "%{[@metadata][action]}" }
  }
  if [action] == 'delete' {
    elasticsearch {
      hosts => ["127.0.0.1"]
      query => "_id:%{[@metadata][_id]}"
      fields => ["type", "type"]
      sort => ""
    }
  } else {
    mutate {
      add_field => { "type" => "%{[doc][type]}" }
    }
  }
}
output {
  elasticsearch { 
    action => "%{[@metadata][action]}"
    document_id => "%{[@metadata][_id]}"
    host => "127.0.0.1"
    index => "myindexname"
    protocol => "http"
    port => 9200   	  	
  }  
  #stdout { codec => rubydebug } #enable this option for debugging purpose
}
  • Sample Data: any sample data
  • Steps to Reproduce: start CouchDB, Elasticsearch and Logstash and then look in the log file of logstash.

Please see: https://discuss.elastic.co/t/couchdb-changes-plugin-and-logstash-5-0-1/66600
update line 180 in couchdb_changes.rb to

@sequence = event.get("[@metadata][seq]")

Thank you very much!

this is fixed by #37, that was merged but not released yet

@ph @untergeek @jsvd
Could you please tell if you plan to release soon?
This is preventing us to upgrade from logstash 2.x to 5.x

ph commented

@dragos-constantin-stoica @YannRobert I've release 3.1.1 on rubygems ,