このページは日本語には対応しておりません。随時翻訳に取り組んでいます。
翻訳に関してご質問やご意見ございましたら、お気軽にご連絡ください

重複排除 (deduplicate) プロセッサーは、ボリュームとノイズを削減するためにデータの重複を削除します。一度に 5,000 件のメッセージをキャッシュし、そこに対して受信ログを比較します。たとえば、複数の同一の警告ログが連続で送信される場合に、ユニークな警告ログのみを保持したいときに使用できます。

Deduplicate プロセッサーの設定方法

  1. フィルタークエリを定義します。指定したフィルタークエリに一致するログだけが処理されます。重複排除されたログと、フィルタークエリに一致しないログはパイプラインの次のステップに送られます。
  2. Type of deduplication ドロップダウンメニューで、下記のフィールドについて Match するか、または Ignore するかを選択します。
    • Match を選択した場合、ログが通過した後、下記で指定するすべてのフィールドの値が同一である将来のログが削除されます。
    • Ignore を選択した場合、ログが通過した後、下記で指定するフィールドを除いたすべてのフィールドの値が同一である将来のログが削除されます。
  3. Match する、または Ignore するフィールドを入力します。最低 1 つのフィールドが必要で、最大 3 つのフィールドを指定できます。
    • サブフィールドを指定する場合は、<OUTER_FIELD>.<INNER_FIELD> のようなパス表記を使用します。詳細は、パス表記の例を参照してください。
  4. Add field をクリックして、フィルターの対象にしたいフィールドを追加します。
パス表記の例

以下のようなメッセージ構造があった場合、double_inner_value という値を持つキーを指すには、outer_key.inner_key.double_inner_key のように記述します:

{
    "outer_key": {
        "inner_key": "inner_value",
        "a": {
            "double_inner_key": "double_inner_value",
            "b": "b value"
        },
        "c": "c value"
    },
    "d": "d value"
}

Filter query syntax

Each processor has a corresponding filter query in their fields. Processors only process logs that match their filter query. And for all processors except the filter processor, logs that do not match the query are sent to the next step of the pipeline. For the filter processor, logs that do not match the query are dropped.

For any attribute, tag, or key:value pair that is not a reserved attribute, your query must start with @. Conversely, to filter reserved attributes, you do not need to append @ in front of your filter query.

For example, to filter out and drop status:info logs, your filter can be set as NOT (status:info). To filter out and drop system-status:info, your filter must be set as NOT (@system-status:info).

Filter query examples:

  • NOT (status:debug): This filters for only logs that do not have the status DEBUG.
  • status:ok service:flask-web-app: This filters for all logs with the status OK from your flask-web-app service.
    • This query can also be written as: status:ok AND service:flask-web-app.
  • host:COMP-A9JNGYK OR host:COMP-J58KAS: This filter query only matches logs from the labeled hosts.
  • @user.status:inactive: This filters for logs with the status inactive nested under the user attribute.

Queries run in the Observability Pipelines Worker are case sensitive. Learn more about writing filter queries in Datadog’s Log Search Syntax.

PREVIEWING: teddy.gesbert/doc-dora