Open aki83reo opened 6 years ago
###################################GENERAL APPROACH I TRIED TO CONNECT AT FIRST ######### input { mongodb { uri => 'mongodb://localhost:27017/mydb' placeholder_db_dir => '/opt/logstash-mongodb' placeholder_db_name => 'logstash_sqlite.db' collection => 'transactions' parse_method => "dig" unpack_mongo_id => true batch_size => 5000 }
}
output { elasticsearch { hosts => "http://localhost:9200/" index => "trans" document_type => "tran1" document_id => "%{[_id]}" } stdout {codec => rubydebug}
##################################Mongo : NoServerAvailable ......#################
###############i tried to introduce "beats" to include my port and cert file data's , but failed , below is my trial , if admin could look at this issue ...
input { beats{ port=>27017 ssl=>true ssl_certificate_authorities => ["F:/es_mdb_kbn/my.crt"] ssl_certificate => "F:/es_mdb_kbn/my.ca-bundle" ssl_key => "F:/Python27/mongodb.pem" ssl_verify_mode => "force_peer" } mongodb { uri => 'mongodb://uname:passwd@url.com:27017/my_db' placeholder_db_dir => '/opt/logstash-mongodb' placeholder_db_name => 'logstash_sqlite.db' collection => 'transactions' parse_method => "dig" unpack_mongo_id => true batch_size => 5000 }
###################################GENERAL APPROACH I TRIED TO CONNECT AT FIRST ######### input { mongodb { uri => 'mongodb://localhost:27017/mydb' placeholder_db_dir => '/opt/logstash-mongodb' placeholder_db_name => 'logstash_sqlite.db' collection => 'transactions' parse_method => "dig" unpack_mongo_id => true batch_size => 5000 }
output { elasticsearch { hosts => "http://localhost:9200/" index => "trans" document_type => "tran1" document_id => "%{[_id]}" } stdout {codec => rubydebug}
##################################Mongo : NoServerAvailable ......#################
###############i tried to introduce "beats" to include my port and cert file data's , but failed , below is my trial , if admin could look at this issue ...
input { beats{ port=>27017 ssl=>true ssl_certificate_authorities => ["F:/es_mdb_kbn/my.crt"] ssl_certificate => "F:/es_mdb_kbn/my.ca-bundle" ssl_key => "F:/Python27/mongodb.pem" ssl_verify_mode => "force_peer" } mongodb { uri => 'mongodb://uname:passwd@url.com:27017/my_db' placeholder_db_dir => '/opt/logstash-mongodb' placeholder_db_name => 'logstash_sqlite.db' collection => 'transactions' parse_method => "dig" unpack_mongo_id => true batch_size => 5000 }
output { elasticsearch { hosts => "http://localhost:9200/" index => "trans" document_type => "tran1" document_id => "%{[_id]}" } stdout {codec => rubydebug}