Skip to content

Feature: Add more flexible rules for match_fields #536

Closed
@HeadHunter483

Description

@HeadHunter483

Currently match_fields can only check fields and whether their values are equal to some of the strings. It would be great to have more flexible way to match fields values by prefix, suffix, contains rules as well and combining them with logical operators.

There was a proposal of do_if field with more complicated rules than match_fields in this issue. And I suggest that it would be interesting to expand it to the tree of nodes, where each node is either logical operator or field operator:

pipelines:
  k8s:
    actions:
      - type: 'modify'
        service: 'unknown'
        do_if:
          logical_op: 'or'
          operands:
            - field_op: 'equal'
              field: 'service'
              values:
                - null
                - '' # empty string
            - field_op: 'contains'
              field: 'message'
              values:
                - 'unknown-service'

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions