1. mongo-input
下载编译
git clone https://github.com/phutchins/logstash-input-mongodb.git
cd logstash-input-mongodb
gem build *.gemspec
cd ..
安装
./logstash/bin/logstash-plugin install logstash-input-mongodb/logstash-input-mongodb-0.4.1.gem
应用
input {
mongodb {
uri => 'mongodb://172.16.1.10:27017/test'
placeholder_db_dir => '/Users/firefly/learn/test/mongo_io/'
placeholder_db_name =>'I_BIZ_CATEGORY.db'
collection => 'BIZ_CATEGORY'
}
}
2. mongo-output
下载编译
git clone https://github.com/logstash-plugins/logstash-output-mongodb.git
cd logstash-output-mongodb
gem build *.gemspec
cd ..
安装
./logstash/bin/logstash-plugin install ./logstash-output-mongodb/logstash-output-mongodb-3.1.4.gem
应用
output {
mongodb {
uri => 'mongodb://172.16.1.10:27018/test'
database => 'test'
placeholder_db_dir => '/Users/firefly/learn/test/mongo_io/'
placeholder_db_name =>'O_BIZ_CATEGORY.db'
collection => 'BIZ_CATEGORY_TEST'
}
}
网友评论