Fluency MongoDB搭建日志系统中的几个问题
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 秒

热AI工具

Undresser.AI Undress
人工智能驱动的应用程序,用于创建逼真的裸体照片

AI Clothes Remover
用于从照片中去除衣服的在线人工智能工具。

Undress AI Tool
免费脱衣服图片

Clothoff.io
AI脱衣机

Video Face Swap
使用我们完全免费的人工智能换脸工具轻松在任何视频中换脸!

热门文章

热工具

记事本++7.3.1
好用且免费的代码编辑器

SublimeText3汉化版
中文版,非常好用

禅工作室 13.0.1
功能强大的PHP集成开发环境

Dreamweaver CS6
视觉化网页开发工具

SublimeText3 Mac版
神级代码编辑软件(SublimeText3)

在开发一个电商网站时,我遇到了一个棘手的问题:如何为用户提供个性化的商品推荐。最初,我尝试了一些简单的推荐算法,但效果并不理想,用户的满意度也因此受到影响。为了提升推荐系统的精度和效率,我决定采用更专业的解决方案。最终,我通过Composer安装了andres-montanez/recommendations-bundle,这不仅解决了我的问题,还大大提升了推荐系统的性能。可以通过一下地址学习composer:学习地址

直接通过 Navicat 查看 MongoDB 密码是不可能的,因为它以哈希值形式存储。取回丢失密码的方法:1. 重置密码;2. 检查配置文件(可能包含哈希值);3. 检查代码(可能硬编码密码)。

CentOS系统上GitLab数据库部署指南选择合适的数据库是成功部署GitLab的关键步骤。GitLab兼容多种数据库,包括MySQL、PostgreSQL和MongoDB。本文将详细介绍如何选择并配置这些数据库。数据库选择建议MySQL:一款广泛应用的关系型数据库管理系统(RDBMS),性能稳定,适用于大多数GitLab部署场景。PostgreSQL:功能强大的开源RDBMS,支持复杂查询和高级特性,适合处理大型数据集。MongoDB:流行的NoSQL数据库,擅长处理海

CentOS系统下MongoDB高效备份策略详解本文将详细介绍在CentOS系统上实施MongoDB备份的多种策略,以确保数据安全和业务连续性。我们将涵盖手动备份、定时备份、自动化脚本备份以及Docker容器环境下的备份方法,并提供备份文件管理的最佳实践。手动备份:利用mongodump命令进行手动全量备份,例如:mongodump-hlocalhost:27017-u用户名-p密码-d数据库名称-o/备份目录此命令会将指定数据库的数据及元数据导出到指定的备份目录。

MongoDB与关系型数据库:深度对比本文将深入探讨NoSQL数据库MongoDB与传统关系型数据库(如MySQL和SQLServer)的差异。关系型数据库采用行和列的表格结构组织数据,而MongoDB则使用灵活的面向文档模型,更适应现代应用的需求。主要区别数据结构:关系型数据库使用预定义模式的表格存储数据,表间关系通过主键和外键建立;MongoDB使用类似JSON的BSON文档存储在集合中,每个文档结构可独立变化,实现无模式设计。架构设计:关系型数据库需要预先定义固定的模式;MongoDB支持

要设置 MongoDB 用户,请按照以下步骤操作:1. 连接到服务器并创建管理员用户。2. 创建要授予用户访问权限的数据库。3. 使用 createUser 命令创建用户并指定其角色和数据库访问权限。4. 使用 getUsers 命令检查创建的用户。5. 可选地设置其他权限或授予用户对特定集合的权限。

在Debian系统上为MongoDB数据库加密,需要遵循以下步骤:第一步:安装MongoDB首先,确保您的Debian系统已安装MongoDB。如果没有,请参考MongoDB官方文档进行安装:https://docs.mongodb.com/manual/tutorial/install-mongodb-on-debian/第二步:生成加密密钥文件创建一个包含加密密钥的文件,并设置正确的权限:ddif=/dev/urandomof=/etc/mongodb-keyfilebs=512

连接MongoDB的工具主要有:1. MongoDB Shell,适用于快速查看数据和执行简单操作;2. 编程语言驱动程序(如PyMongo, MongoDB Java Driver, MongoDB Node.js Driver),适合应用开发,但需掌握其使用方法;3. GUI工具(如Robo 3T, Compass),提供图形化界面,方便初学者和快速数据查看。选择工具需考虑应用场景和技术栈,并注意连接字符串配置、权限管理及性能优化,如使用连接池和索引。
