プロが教える店舗&オフィスのセキュリティ対策術

fleuentd経由のデータをmongodbへinsertしてるのですが、
転送されたデータ件数とmongodbへinsertされている件数
が一致せず、困っております。
各ログファイルにも目立ったエラーは、出力されてませんでした。


環境ですが、2サーバ共に、
OS:CentOS5.5_64
fluentd 0.10.30
fluent-plugin-mongo (0.6.13, 0.6.11)
MongoDB shell version: 2.2.2


データの流れですが、
webサーバ→logサーバ→mongodb
※Logサーバとmongodbは、同じサーバです。
webサーバ→logサーバは、問題無く全データ転送されます。
 logサーバ→mongodbは、数件差分が発生します(mongodbが数件足らない)。

各設定以下になります。
【webサーバ td-agent.conf】
///////////////////////////////////////////
<source>
type tail
path 省略/test.log
format 省略
tag test.test
pos_file /var/log/td-agent/tmp/test.log.pos
</source>

<match test.*>
type forward
buffer_chunk_limit 10m
flush_interval 10s
send_timeout 5s
recover_wait 5s
retry_limit 5
<server>
host 省略
</server>
</match>
///////////////////////////////////////////

【logサーバ td-agent.conf】
///////////////////////////////////////////
<source>
type forward
</source>

<match test.test>
type copy

<store>
type mongo
database hogehoge
collection test

buffer_type memory
buffer_chunk_limit 10m
buffer_queue_limit 1280
flush_interval 1s
retry_limit 10
retry_wait 5s
</store>

<store>
type file
path /var/log/td-agent/test
buffer_chunk_limit 1g
</store>
</match>
///////////////////////////////////////////


【webサーバ mongod.conf】
///////////////////////////////////////////
# mongo.conf

#where to log
logpath=/var/log/mongo/mongod.log

logappend=true

# fork and run in background
fork = true

#port = 27017
dbpath=/var/lib/mongo

# location of pidfile
pidfilepath = /var/run/mongodb/mongod.pid

# Turn on/off security. Off is currently the default
#noauth = true
auth = true
///////////////////////////////////////////

どうぞ、ご教示お願いいたします。

A 回答 (1件)

欠落するデータに規則性はあるんですか?



キーの重複とかは?

この回答への補足

bin-chanさん

ご連絡有難う御座います。

欠落するデータの規則性もなく、キーの重複エラーも発生しておりません。

私と同じようなサーバ構成にて構築されている方ネット上で拝見しておりま
すが、実際mongoへinsertされている件数は、一致してるのでしょうか?

やはり、mongoの設定がおかしいのでしょうか?

補足日時:2013/03/11 11:45
    • good
    • 0

お探しのQ&Aが見つからない時は、教えて!gooで質問しましょう!