데이터 베이스 MySQL 튜토리얼 Fluency +MongoDB搭建日志系统中的几个问题

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

Jun 07, 2016 pm 05:20 PM
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-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

linux

본 웹사이트의 성명
본 글의 내용은 네티즌들의 자발적인 기여로 작성되었으며, 저작권은 원저작자에게 있습니다. 본 사이트는 이에 상응하는 법적 책임을 지지 않습니다. 표절이나 침해가 의심되는 콘텐츠를 발견한 경우 admin@php.cn으로 문의하세요.

핫 AI 도구

Undresser.AI Undress

Undresser.AI Undress

사실적인 누드 사진을 만들기 위한 AI 기반 앱

AI Clothes Remover

AI Clothes Remover

사진에서 옷을 제거하는 온라인 AI 도구입니다.

Undress AI Tool

Undress AI Tool

무료로 이미지를 벗다

Clothoff.io

Clothoff.io

AI 옷 제거제

Video Face Swap

Video Face Swap

완전히 무료인 AI 얼굴 교환 도구를 사용하여 모든 비디오의 얼굴을 쉽게 바꾸세요!

뜨거운 도구

메모장++7.3.1

메모장++7.3.1

사용하기 쉬운 무료 코드 편집기

SublimeText3 중국어 버전

SublimeText3 중국어 버전

중국어 버전, 사용하기 매우 쉽습니다.

스튜디오 13.0.1 보내기

스튜디오 13.0.1 보내기

강력한 PHP 통합 개발 환경

드림위버 CS6

드림위버 CS6

시각적 웹 개발 도구

SublimeText3 Mac 버전

SublimeText3 Mac 버전

신 수준의 코드 편집 소프트웨어(SublimeText3)

net4.0의 용도는 무엇입니까 net4.0의 용도는 무엇입니까 May 10, 2024 am 01:09 AM

.NET 4.0은 다양한 애플리케이션을 만드는 데 사용되며 객체 지향 프로그래밍, 유연성, 강력한 아키텍처, 클라우드 컴퓨팅 통합, 성능 최적화, 광범위한 라이브러리, 보안, 확장성, 데이터 액세스 및 모바일을 포함한 풍부한 기능을 애플리케이션 개발자에게 제공합니다. 개발 지원.

서버리스 아키텍처에 Java 기능 및 데이터베이스 통합 서버리스 아키텍처에 Java 기능 및 데이터베이스 통합 Apr 28, 2024 am 08:57 AM

서버리스 아키텍처에서는 Java 기능을 데이터베이스와 통합하여 데이터베이스의 데이터에 액세스하고 조작할 수 있습니다. 주요 단계에는 Java 기능 생성, 환경 변수 구성, 기능 배포 및 기능 테스트가 포함됩니다. 이러한 단계를 따르면 개발자는 데이터베이스에 저장된 데이터에 원활하게 액세스하는 복잡한 애플리케이션을 구축할 수 있습니다.

데비안에서 MongoDB 자동 확장을 구성하는 방법 데비안에서 MongoDB 자동 확장을 구성하는 방법 Apr 02, 2025 am 07:36 AM

이 기사는 데비안 시스템에서 MongoDB를 구성하여 자동 확장을 달성하는 방법을 소개합니다. 주요 단계에는 MongoDB 복제 세트 및 디스크 공간 모니터링 설정이 포함됩니다. 1. MongoDB 설치 먼저 MongoDB가 데비안 시스템에 설치되어 있는지 확인하십시오. 다음 명령을 사용하여 설치하십시오. sudoaptupdatesudoaptinstall-imongb-org 2. MongoDB Replica 세트 MongoDB Replica 세트 구성은 자동 용량 확장을 달성하기위한 기초 인 고 가용성 및 데이터 중복성을 보장합니다. MongoDB 서비스 시작 : sudosystemctlstartMongodsudosys

데비안에서 MongoDB의 고 가용성을 보장하는 방법 데비안에서 MongoDB의 고 가용성을 보장하는 방법 Apr 02, 2025 am 07:21 AM

이 기사는 데비안 시스템에서 고도로 사용 가능한 MongoDB 데이터베이스를 구축하는 방법에 대해 설명합니다. 우리는 데이터 보안 및 서비스가 계속 운영되도록하는 여러 가지 방법을 모색 할 것입니다. 주요 전략 : ReplicaSet : ReplicaSet : 복제품을 사용하여 데이터 중복성 및 자동 장애 조치를 달성합니다. 마스터 노드가 실패하면 복제 세트는 서비스의 지속적인 가용성을 보장하기 위해 새 마스터 노드를 자동으로 선택합니다. 데이터 백업 및 복구 : MongoDump 명령을 정기적으로 사용하여 데이터베이스를 백업하고 데이터 손실의 위험을 처리하기 위해 효과적인 복구 전략을 공식화합니다. 모니터링 및 경보 : 모니터링 도구 (예 : Prometheus, Grafana) 배포 MongoDB의 실행 상태를 실시간으로 모니터링하고

MongoDB 데이터베이스 비밀번호를 보는 Navicat의 방법 MongoDB 데이터베이스 비밀번호를 보는 Navicat의 방법 Apr 08, 2025 pm 09:39 PM

해시 값으로 저장되기 때문에 MongoDB 비밀번호를 Navicat을 통해 직접 보는 것은 불가능합니다. 분실 된 비밀번호 검색 방법 : 1. 비밀번호 재설정; 2. 구성 파일 확인 (해시 값이 포함될 수 있음); 3. 코드를 점검하십시오 (암호 하드 코드 메일).

Pi Coin의 주요 업데이트 : Pi Bank가오고 있습니다! Pi Coin의 주요 업데이트 : Pi Bank가오고 있습니다! Mar 03, 2025 pm 06:18 PM

Pinetwork는 혁신적인 모바일 뱅킹 플랫폼 인 Pibank를 출시하려고합니다! Pinetwork는 오늘 Pibank라고 불리는 Elmahrosa (Face) Pimisrbank에 대한 주요 업데이트를 발표했습니다. Pibank는 Pinetwork Cryptocurrency 기능을 완벽하게 통합하여 화폐 통화 및 암호 화폐의 원자 교환을 실현합니다 (US Dollar, Indones rupiah, indensian rupiah and with rupiah and and indensian rupiah and rupiah and and Indones rupiah and rupiahh and rupiah and rupiah and rupiah and rupiah and rupiah and rupiah and rupiah cherrenciance) ). Pibank의 매력은 무엇입니까? 알아 보자! Pibank의 주요 기능 : 은행 계좌 및 암호 화폐 자산의 원 스톱 관리. 실시간 거래를 지원하고 생물학을 채택하십시오

Centos Mongodb 백업 전략은 무엇입니까? Centos Mongodb 백업 전략은 무엇입니까? Apr 14, 2025 pm 04:51 PM

CentOS 시스템 하에서 MongoDB 효율적인 백업 전략에 대한 자세한 설명이 기사는 CentOS 시스템에서 MongoDB 백업을 구현하기위한 다양한 전략을 자세히 소개하여 데이터 보안 및 비즈니스 연속성을 보장 할 것입니다. Docker 컨테이너 환경에서 수동 백업, 시간이 정해진 백업, 자동 스크립트 백업 및 백업 메소드를 다루고 백업 파일 관리를위한 모범 사례를 제공합니다. 수동 백업 : MongoDump 명령을 사용하여 Manual 전체 백업을 수행하십시오 (예 : Mongodump-HlocalHost : 27017-U username-P password-d 데이터베이스 이름 -o/백업 디렉토리이 명령은 지정된 데이터베이스의 데이터 및 메타 데이터를 지정된 백업 디렉토리로 내보내게됩니다.

Debian MongoDB에서 데이터를 암호화하는 방법 Debian MongoDB에서 데이터를 암호화하는 방법 Apr 12, 2025 pm 08:03 PM

데비안 시스템에서 MongoDB 데이터베이스를 암호화하려면 다음 단계에 따라 필요합니다. 1 단계 : 먼저 MongoDB 설치 먼저 Debian 시스템이 MongoDB가 설치되어 있는지 확인하십시오. 그렇지 않은 경우 설치를위한 공식 MongoDB 문서를 참조하십시오 : https://docs.mongodb.com/manual/tutorial/install-mongodb-ondodb-on-debian/step 2 : 암호화 키 파일 생성 암호화 키를 포함하는 파일을 만듭니다.

See all articles