New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

filter_modify: Add new operations, conditionals #618

Merged
merged 1 commit into from Jun 14, 2018

Conversation

Projects
None yet
2 participants
@michiel
Contributor

michiel commented Jun 6, 2018

This extends the number of operations the modify filter can perform to,

  • RENAME
  • HARD_RENAME
  • ADD
  • SET
  • REMOVE
  • REMOVE_WILDCARD
  • COPY
  • HARD_COPY

In addition, this also adds the option to add conditions that have to be met for a filter instance's rules to be applied.

The possible conditions are,

  • KEY_EXISTS
  • KEY_DOES_NOT_EXIST
  • KEY_VALUE_EQUALS
  • KEY_VALUE_DOES_NOT_EQUAL

Example configuration,

[FILTER]
    Name    modify
    Match   *

    Set sourcetype memstats

[FILTER]
    Name    modify
    Match   *

    # Multiple conditions are possible, all have to be met
    Condition Key_Value_Does_Not_Equal sourcetype memstats
    Condition Key_Value_Equals sourcetype memstats

    Add sourcetypeX memstatsX
    Copy sourcetypeX sourcetype_copy
    Rename sourcetypeX new_sourcetype
    Set all_done true
filter_modify: Add new operations, conditionals
This extends the number of operations the modify filter can perform to,

  RENAME, HARD_RENAME, ADD, SET, REMOVE, REMOVE_WILDCARD, COPY,
  HARD_COPY

In addition, this also adds conditions that have to be met for a filter
instance's rules to be applied.

The possible conditions are,

  KEY_EXISTS, KEY_DOES_NOT_EXIST, KEY_VALUE_EQUALS,
  KEY_VALUE_DOES_NOT_EQUAL

Signed-off-by: Michiel Kalkman <michiel@nosuchtype.com>
@michiel

This comment has been minimized.

Contributor

michiel commented Jun 6, 2018

See also #601 , #612, #616

@michiel

This comment has been minimized.

Contributor

michiel commented Jun 13, 2018

Documentation updated in PR fluent/fluent-bit-docs#79

@michiel michiel referenced this pull request Jun 13, 2018

Closed

Filter conditional rename #612

@edsiper edsiper merged commit c07e0c5 into fluent:master Jun 14, 2018

2 checks passed

DCO All commits have a DCO sign-off from the author
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@edsiper

This comment has been minimized.

Contributor

edsiper commented Jun 14, 2018

thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment