LoginSignup
6
7

More than 5 years have passed since last update.

fluentdでメッセージにuuidを追加する方法

Posted at

fluentd-plugin-addを使用して実現出来ます。

matchを使う場合

設定ファイル例

<match test.**>
  type add
  add_tag_prefix debug
  uuid true
</match>

入力例

test.aa: {"json":"dayo"}

出力例

debug.test.aa: {"json":"dayo", "uuid":"427037E7-235B-4F6C-9975-15AAC75E56C5"}

filterを使う場合

設定ファイル例

<filter test.**>
  type add
  uuid true
</filter>

入力例

test.aa: {"json":"dayo"}

出力例

test.aa: {"json":"dayo", "uuid":"427037E7-235B-4F6C-9975-15AAC75E56C5"}

それぞれuuidが追加されてます。

6
7
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
6
7