Fluency+MongoDB搭建日志系统中的几个问题
内容导读
互联网集市收集整理的这篇技术教程文章主要介绍了Fluency+MongoDB搭建日志系统中的几个问题,小编现在分享给大家,供广大互联网技能从业者学习和参考。文章包含6629字,纯文字阅读大概需要10分钟。
内容图文
error=quot;Unknown output plugin
1.运行时如下错误,
error="Unknown output plugin 'mongo'. Run 'gem search -rd fluent-plugin' to find plugins"
搜索mongodb插件
gem search -rd fluent-plugin-mongo
得到结果
*** REMOTE GEMS ***
fluent-plugin-mongo (0.6.7)
Author: Masahiro Nakagawa
Homepage: https://github.com/fluent/fluent-plugin-mongo
MongoDB plugin for Fluent event collector
安装这个插件
gem install fluent-plugin-mongo
2、运行的时候可能会得到如下提示
**Notice: C extension not loaded. This is required for optimum MongoDB Ruby driver performance.
You can install the extension as follows:
gem install bson_ext
If you continue to receive this message after installing, make sure that the
bson_ext gem is in your load path and that the bson_ext and mongo gems are of the same version.
按照上述提示执行 gem install bson_ext
3、flunt.conf
type tail
path /home/aircom/mongodb-linux-i686-2.0.6/bin/logs/1001.log
format /^*(?
#format /^(?
4、login primary node run command
PRIMARY> db.fmongo.find().sort({"_id":-1})
{ "_id" : ObjectId("5062d3700ce0ea43fc000387"), "message" : "Wed Sep 26 18:05:28 [initandlisten] connection accepted from 192.168.19.201:34114 #3204", "time" : ISODate("2012-09-26T10:05:28Z") }
{ "_id" : ObjectId("5062d3700ce0ea43fc000386"), "message" : "Wed Sep 26 18:05:28 [conn3201] end connection 192.168.19.201:34108", "time" : ISODate("2012-09-26T10:05:28Z") }
{ "_id" : ObjectId("5062d3700ce0ea43fc000385"), "message" : "Wed Sep 26 18:05:28 [initandlisten] connection accepted from 192.168.19.201:34113 #3203", "time" : ISODate("2012-09-26T10:05:28Z") }
{ "_id" : ObjectId("5062d3700ce0ea43fc000384"), "message" : "Wed Sep 26 18:05:28 [conn3200] end connection 192.168.19.201:34107",
5、fluentd 配置正常时的启动日志
fluentd -c fluent.conf -vv &
[1] 15847
[root@Server202 fluentd-0.10.6]# 2012-09-26 16:28:26 +0800: fluent/supervisor.rb:153:supervise: starting fluentd-0.10.25
2012-09-26 16:28:26 +0800: fluent/supervisor.rb:235:read_config: reading config file path="fluent.conf"
2012-09-26 16:28:26 +0800: fluent/plugin.rb:85:register_impl: registered buffer plugin 'file'
2012-09-26 16:28:26 +0800: fluent/plugin.rb:85:register_impl: registered buffer plugin 'memory'
2012-09-26 16:28:26 +0800: fluent/plugin.rb:85:register_impl: registered input plugin 'exec'
2012-09-26 16:28:26 +0800: fluent/plugin.rb:85:register_impl: registered input plugin 'forward'
2012-09-26 16:28:26 +0800: fluent/plugin.rb:85:register_impl: registered input plugin 'gc_stat'
2012-09-26 16:28:26 +0800: fluent/plugin.rb:85:register_impl: registered input plugin 'http'
2012-09-26 16:28:26 +0800: fluent/plugin.rb:85:register_impl: registered input plugin 'object_space'
2012-09-26 16:28:26 +0800: fluent/plugin.rb:85:register_impl: registered input plugin 'status'
2012-09-26 16:28:26 +0800: fluent/plugin.rb:85:register_impl: registered input plugin 'tcp'
2012-09-26 16:28:26 +0800: fluent/plugin.rb:85:register_impl: registered input plugin 'unix'
2012-09-26 16:28:26 +0800: fluent/plugin.rb:85:register_impl: registered input plugin 'syslog'
2012-09-26 16:28:26 +0800: fluent/plugin.rb:85:register_impl: registered input plugin 'tail'
2012-09-26 16:28:26 +0800: fluent/plugin.rb:85:register_impl: registered output plugin 'copy'
2012-09-26 16:28:26 +0800: fluent/plugin.rb:85:register_impl: registered output plugin 'exec'
2012-09-26 16:28:26 +0800: fluent/plugin.rb:85:register_impl: registered output plugin 'exec_filter'
2012-09-26 16:28:26 +0800: fluent/plugin.rb:85:register_impl: registered output plugin 'file'
2012-09-26 16:28:26 +0800: fluent/plugin.rb:85:register_impl: registered output plugin 'forward'
2012-09-26 16:28:26 +0800: fluent/plugin.rb:85:register_impl: registered output plugin 'null'
2012-09-26 16:28:26 +0800: fluent/plugin.rb:85:register_impl: registered output plugin 'roundrobin'
2012-09-26 16:28:26 +0800: fluent/plugin.rb:85:register_impl: registered output plugin 'stdout'
2012-09-26 16:28:26 +0800: fluent/plugin.rb:85:register_impl: registered output plugin 'tcp'
2012-09-26 16:28:26 +0800: fluent/plugin.rb:85:register_impl: registered output plugin 'unix'
2012-09-26 16:28:26 +0800: fluent/plugin.rb:85:register_impl: registered output plugin 'test'
2012-09-26 16:28:26 +0800: fluent/engine.rb:63:block in configure: adding source type="forward"
2012-09-26 16:28:26 +0800: fluent/engine.rb:63:block in configure: adding source type="http"
2012-09-26 16:28:26 +0800: fluent/engine.rb:63:block in configure: adding source type="tail"
2012-09-26 16:28:26 +0800: plugin/in_tail.rb:49:configure: 'pos_file PATH' parameter is not set to a 'tail' source.
2012-09-26 16:28:26 +0800: plugin/in_tail.rb:50:configure: this parameter is highly recommended to save the position to resume tailing.
2012-09-26 16:28:26 +0800: fluent/engine.rb:79:block in configure: adding match pattern="mongo.**" type="mongo"
2012-09-26 16:28:26 +0800: fluent/plugin.rb:85:register_impl: registered output plugin 'mongo'
2012-09-26 16:28:27 +0800: plugin/out_mongo.rb:70:configure: Setup mongo configuration: mode = normal
2012-09-26 16:28:27 +0800: fluent/engine.rb:79:block in configure: adding match pattern="debug.**" type="stdout"
2012-09-26 16:28:27 +0800: plugin/in_forward.rb:60:listen: listening fluent socket on 0.0.0.0:24224
2012-09-26 16:28:27 +0800: plugin/in_http.rb:74:start: listening http on 0.0.0.0:8888
2012-09-26 16:28:27 +0800: plugin/in_tail.rb:262:initialize: following tail of /home/aircom/mongodb-linux-i686-2.0.6/bin/logs/1001.log
2012-09-26 16:28:49 +0800: fluent/parser.rb:38:call: pattern not match: Wed Sep 26 16:28:49 [FileAllocator] allocating new datafile /home/aircom/mongodb-linux-i686-2.0.6/bin/db/apache.ns, filling with zeroes...
2012-09-26 16:28:49 +0800: fluent/parser.rb:38:call: pattern not match: Wed Sep 26 16:28:49 [FileAllocator] creating directory /home/aircom/mongodb-linux-i686-2.0.6/bin/db/_tmp
2012-09-26 16:28:49 +0800: fluent/parser.rb:38:call: pattern not match: Wed Sep 26 16:28:49 [FileAllocator] allocating new datafile /home/aircom/mongodb-linux-i686-2.0.6/bin/db/apache.0, filling with zeroes...
2012-09-26 16:28:50 +0800: fluent/parser.rb:38:call: pattern not match: Wed Sep 26 16:28:50 [FileAllocator] allocating new datafile /home/aircom/mongodb-linux-i686-2.0.6/bin/db/apache.1, filling with zeroes...
2012-09-26 16:28:50 +0800: fluent/parser.rb:38:call: pattern not match: Wed Sep 26 16:28:50 [conn2616] build index done 0 records 0.001 secs
内容总结
以上是互联网集市为您收集整理的Fluency+MongoDB搭建日志系统中的几个问题全部内容,希望文章能够帮你解决Fluency+MongoDB搭建日志系统中的几个问题所遇到的程序开发问题。 如果觉得互联网集市技术教程内容还不错,欢迎将互联网集市网站推荐给程序员好友。
内容备注
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 gblab@vip.qq.com 举报,一经查实,本站将立刻删除。
内容手机端
扫描二维码推送至手机访问。