Unsure why i am unable to connect couchdb to elasticsearch via logstash


#1

I am quite new to both Logstash and elasticsearch and as the title suggested i have no idea why my data is not being imported into elasticsearch anyway here is my logstash config file

input {
couchdb_changes {
db => test
host => "localhost"
port => 5984
codec => "json"
}
}
output {
elasticsearch {
host => "localhost"
index => "Krakkan"
protocol => "http"
host => "localhost"
port => 9200
codec => "json"
}
}

More info can be provided if needed


(Mark Walkom) #2

What's in your logs?
Have you tried setting -v or --debug to get more info?


#3

This is the output i got from using the v flag

No sequence_path set, generating one... {:sequence_path=>"/home/vbox/.couchdb_seq", :level=>:info}
Connecting to CouchDB _changes stream at: {:host=>"localhost", :port=>"5984", :db=>"test", :level=>:info}
Create client to elasticsearch server on localhost: {:level=>:info}
Automatic template management enabled {:manage_template=>"true", :level=>:info}
Using mapping template {:template=>{"template"=>"logstash-", "settings"=>{"index.refresh_interval"=>"5s"}, "mappings"=>{"default"=>{"_all"=>{"enabled"=>true, "omit_norms"=>true}, "dynamic_templates"=><Java::JavaUtil::ArrayList:-1064940777 [{"message_field"=>{"match"=>"message", "match_mapping_type"=>"string", "mapping"=>{"type"=>"string", "index"=>"analyzed", "omit_norms"=>true}}}, {"string_fields"=>{"match"=>"", "match_mapping_type"=>"string", "mapping"=>{"type"=>"string", "index"=>"analyzed", "omit_norms"=>true, "fields"=>{"raw"=>{"type"=>"string", "index"=>"not_analyzed", "ignore_above"=>256}}}}}]>, "properties"=>{"@version"=>{"type"=>"string", "index"=>"not_analyzed"}, "geoip"=>{"type"=>"object", "dynamic"=>true, "properties"=>{"location"=>{"type"=>"geo_point"}}}}}}}, :level=>:info}
New Elasticsearch output {:cluster=>nil, :host=>["localhost"], :port=>9200, :embedded=>false, :protocol=>"http", :level=>:info}


(Magnus B├Ąck) #4

Things are happening in your CouchDB database, right, so that there are events to pick up?

For debugging purposes I strongly recommend not hooking up ES right away. Use a stdout { codec => rubydebug } output first until you know you're getting the messages you want.


(system) #5