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-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

ホットAIツール

Undresser.AI Undress
リアルなヌード写真を作成する AI 搭載アプリ

AI Clothes Remover
写真から衣服を削除するオンライン AI ツール。

Undress AI Tool
脱衣画像を無料で

Clothoff.io
AI衣類リムーバー

Video Face Swap
完全無料の AI 顔交換ツールを使用して、あらゆるビデオの顔を簡単に交換できます。

人気の記事

ホットツール

メモ帳++7.3.1
使いやすく無料のコードエディター

SublimeText3 中国語版
中国語版、とても使いやすい

ゼンドスタジオ 13.0.1
強力な PHP 統合開発環境

ドリームウィーバー CS6
ビジュアル Web 開発ツール

SublimeText3 Mac版
神レベルのコード編集ソフト(SublimeText3)

ホットトピック









.NET 4.0 はさまざまなアプリケーションの作成に使用され、オブジェクト指向プログラミング、柔軟性、強力なアーキテクチャ、クラウド コンピューティングの統合、パフォーマンスの最適化、広範なライブラリ、セキュリティ、スケーラビリティ、データ アクセス、モバイルなどの豊富な機能をアプリケーション開発者に提供します。開発サポート。

サーバーレス アーキテクチャでは、Java 関数をデータベースと統合して、データベース内のデータにアクセスして操作できます。主な手順には、Java 関数の作成、環境変数の構成、関数のデプロイ、および関数のテストが含まれます。これらの手順に従うことで、開発者はデータベースに保存されているデータにシームレスにアクセスする複雑なアプリケーションを構築できます。

この記事では、自動拡張を実現するためにDebianシステムでMongodbを構成する方法を紹介します。主な手順には、Mongodbレプリカセットとディスクスペース監視のセットアップが含まれます。 1。MongoDBのインストール最初に、MongoDBがDebianシステムにインストールされていることを確認してください。次のコマンドを使用してインストールします。sudoaptupdatesudoaptinstinstall-yymongodb-org2。mongodbレプリカセットMongodbレプリカセットの構成により、自動容量拡張を達成するための基礎となる高可用性とデータ冗長性が保証されます。 Mongodbサービスを開始:Sudosystemctlstartmongodsudosys

この記事では、Debianシステムで非常に利用可能なMongoDBデータベースを構築する方法について説明します。データのセキュリティとサービスが引き続き動作し続けるようにするための複数の方法を探ります。キー戦略:レプリカセット:レプリカセット:レプリカセットを使用して、データの冗長性と自動フェールオーバーを実現します。マスターノードが失敗すると、レプリカセットが自動的に新しいマスターノードを選択して、サービスの継続的な可用性を確保します。データのバックアップと回復:MongoDumpコマンドを定期的に使用してデータベースをバックアップし、データ損失のリスクに対処するために効果的な回復戦略を策定します。監視とアラーム:監視ツール(プロメテウス、グラファナなど)を展開して、MongoDBの実行ステータスをリアルタイムで監視し、

Hash値として保存されているため、Navicatを介してMongoDBパスワードを直接表示することは不可能です。紛失したパスワードを取得する方法:1。パスワードのリセット。 2。構成ファイルを確認します(ハッシュ値が含まれる場合があります)。 3.コードを確認します(パスワードをハードコードできます)。

Pinetworkは、革新的なモバイルバンキングプラットフォームであるPibankを立ち上げようとしています! Pinetworkは本日、Pibankと呼ばれるElmahrosa(Face)Pimisrbankのメジャーアップデートをリリースしました。これは、従来の銀行サービスと、フィアット通貨の原子交換と暗号通貨の原子交換を実現します(resuptocursisを使用するなど、聖職者のような聖職者など、 DC)。ピバンクの魅力は何ですか?見つけましょう!ピバンクの主な機能:銀行口座と暗号通貨資産のワンストップ管理。リアルタイムトランザクションをサポートし、生物種を採用します

MongoDB効率的なバックアップ戦略の詳細な説明CENTOSシステムでは、この記事では、データセキュリティとビジネスの継続性を確保するために、CENTOSシステムにMongoDBバックアップを実装するためのさまざまな戦略を詳細に紹介します。 Dockerコンテナ環境でのマニュアルバックアップ、タイミング付きバックアップ、自動スクリプトバックアップ、バックアップメソッドをカバーし、バックアップファイル管理のベストプラクティスを提供します。マニュアルバックアップ:MongoDumpコマンドを使用して、マニュアルフルバックアップを実行します。たとえば、Mongodump-Hlocalhost:27017-U Username-P Password-Dデータベース名-O/バックアップディレクトリこのコマンドは、指定されたデータベースのデータとメタデータを指定されたバックアップディレクトリにエクスポートします。

DebianシステムでMongoDBデータベースを暗号化するには、次の手順に従う必要があります。ステップ1:MongoDBのインストール最初に、DebianシステムがMongoDBをインストールしていることを確認してください。そうでない場合は、インストールについては公式のMongoDBドキュメントを参照してください:https://docs.mongodb.com/manual/tutorial/install-mongodb-onedbian/-step 2:暗号化キーファイルを作成し、暗号化キーを含むファイルを作成し、正しい許可を設定します。
