Back to Vector

More Condition Predicates

website/content/en/highlights/2020-04-01-more-condition-predicates.md

0.55.0924 B
Original Source

Vector has a concept "conditions" that are used to qualify events. For example, this is used in Vector's unit testing feature, swimlanes transform, and filter transform. This change adds new predicates that enable powerful matching and condition expression. Specifically, the following predicates were added:

  • begins_with
  • contains
  • ends_with
  • is_log
  • is_metric
  • regex

Example

For example, you can filter all messages that contain the error term with the new contains predicate:

yaml
transforms:
  errors:
    type: "filter"
    condition:
      "message.contain": "error"

The world is your oyster.