Fluency MongoDB搭建日志系统中的几个问题

WBOY
发布: 2016-06-07 17:20:45
原创
1090 人浏览过

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-Fluency MongoDB搭建日志系统中的几个问题-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: 启动 Fluentd-0.10.25
2012-09-26 16:28:26 0800: Fluent/supervisor.rb:235:read_config: 读取配置文件 path=" Fluent.conf"
2012 -09-26 16:28:26 0800: Fluent/plugin.rb:85:register_impl: 注册缓冲区插件 'file'
2012-09-26 16:28:26 0800: Fluent/plugin.rb:85: register_impl:注册缓冲区插件'内存'
2012-09-26 16:28:26 0800:流畅/plugin.rb:85:register_impl:注册输入插件'exec'
2012-09-26 16:28 :26 0800: Fluent/plugin.rb:85:register_impl: 注册输入插件 'forward'
2012-09-26 16:28:26 0800: fluence/plugin.rb:85:register_impl: 注册输入插件 'gc_stat '
2012-09-26 16:28:26 0800: Fluent/plugin.rb:85:register_impl: 注册输入插件 'http'
2012-09-26 16:28:26 0800: fluence/plugin .rb:85:register_impl: 注册输入插件 'object_space'
2012-09-26 16:28:26 0800: fluence/plugin.rb:85:register_impl: 注册输入插件 'status'
2012-09 -26 16:28:26 0800: Fluent/plugin.rb:85:register_impl: 注册输入插件 'tcp'
2012-09-26 16:28:26 0800: Fluent/plugin.rb:85:register_impl:注册输入插件 'unix'
2012-09-26 16:28:26 0800: fluence/plugin.rb:85:register_impl: 注册输入插件 'syslog'
2012-09-26 16:28:26 0800: Fluent/plugin.rb:85:register_impl: 注册输入插件 'tail'
2012-09-26 16:28:26 0800: fluence/plugin.rb:85:register_impl: 注册输出插件 'copy'
2012-09-26 16:28:26 0800: Fluent/plugin.rb:85:register_impl: 注册输出插件 'exec'
2012-09-26 16:28:26 0800: fluence/plugin.rb :85:register_impl: 注册输出插件 'exec_filter'
2012-09-26 16:28:26 0800: fluence/plugin.rb:85:register_impl: 注册输出插件 'file'
2012-09-26 16:28:26 0800: fluence/plugin.rb:85:register_impl: 注册输出插件 'forward'
2012-09-26 16:28:26 0800: fluence/plugin.rb:85:register_impl: 注册输出插件 'null'
2012-09-26 16:28:26 0800: fluence/plugin.rb:85:register_impl: 注册输出插件 'roundrobin'
2012-09-26 16:28:26 0800: Fluent/plugin.rb:85:register_impl: 注册输出插件 'stdout'
2012-09-26 16:28:26 0800: fluence/plugin.rb:85:register_impl: 注册输出插件 'tcp'
2012-09-26 16:28:26 0800: Fluent/plugin.rb:85:register_impl: 注册输出插件 'unix'
2012-09-26 16:28:26 0800: Fluent/plugin.rb:85 :register_impl: 注册输出插件 'test'
2012-09-26 16:28:26 0800: flutter/engine.rb:63:configure 中的块:添加 source type="forward"
2012-09- 26 16:28:26 0800: Fluent/engine.rb:63: 配置中的块:添加源类型 =“http”
2012-09-26 16:28:26 0800: Fluent/engine.rb:63:配置中的块:添加源类型=“tail”
2012-09-26 16:28:26 0800:plugin/in_tail.rb:49:configure:'pos_file PATH'参数未设置为'tail'源.
2012-09-26 16:28:26 0800:plugin/in_tail.rb:50:configure:强烈建议使用此参数保存恢复拖尾的位置。
2012-09-26 16:28:26 0800:在配置中使用流利/engine.rb:79:block:添加匹配模式=“mongo.**”类型=“mongo”
2012-09-26 16:28:26 0800:流利/plugin.rb:85:register_impl: 注册输出插件 'mongo'
2012-09-26 16:28:27 0800:plugin/out_mongo.rb:70:configure: 设置 mongo 配置:模式 = 正常
2012-09-26 16:28:27 0800:configure中的flutter/engine.rb:79:block:添加匹配模式=“debug.**”type=“stdout”

2012- 09-26 16:28:27 0800:plugin/in_forward.rb:60:listen:在 0.0.0.0:24224
2012-09-26 16:28:27 0800:plugin/in_http.rb 上监听流畅套接字: 74:start: 在 0.0.0.0:8888

2012-09-26 16:28:27 0800:plugin/in_tail.rb:262:initialize: 跟随 /home/aircom 的尾部监听 http /mongodb-Fluency MongoDB搭建日志系统中的几个问题-i686-2.0.6/bin/logs/1001.log
2012-09-26 16:28:49 0800:流畅/parser.rb:38:调用:模式不匹配: Wed Sep 26 16:28:49 [FileAllocator] 分配新数据文件 /home/aircom/mongodb-Fluency MongoDB搭建日志系统中的几个问题-i686-2.0.6/bin/db/apache.ns,用零填充...
2012-09- 26 16:28:49 0800: Fluent/parser.rb:38:call: 模式不匹配: Wed Sep 26 16:28:49 [FileAllocator] 创建目录 /home/aircom/mongodb-Fluency MongoDB搭建日志系统中的几个问题-i686-2.0.6/ bin/db/_tmp
2012-09-26 16:28:49 0800: fluence/parser.rb:38:call: 模式不匹配: Wed Sep 26 16:28:49 [FileAllocator] 分配新数据文件 /home /aircom/mongodb-Fluency MongoDB搭建日志系统中的几个问题-i686-2.0.6/bin/db/apache.0,用零填充...
2012-09-26 16:28:50 0800: Fluent/parser.rb:38:呼叫:模式不匹配:Wed Sep 26 16:28:50 [FileAllocator] 分配新数据文件 /home/aircom/mongodb-Fluency MongoDB搭建日志系统中的几个问题-i686-2.0.6/bin/db/apache.1,用零填充...
2012-09-26 16:28:50 0800: fluence/parser.rb:38:call: 模式不匹配: Wed Sep 26 16:28:50 [conn2616] 构建索引完成 0 条记录 0.001 秒

Fluency  MongoDB搭建日志系统中的几个问题

相关标签:
来源:php.cn
本站声明
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn
热门教程
更多>
最新下载
更多>
网站特效
网站源码
网站素材
前端模板
关于我们 免责声明 Sitemap
PHP中文网:公益在线PHP培训,帮助PHP学习者快速成长!