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

Add regex replace extractor #1485

Merged
merged 1 commit into from Oct 14, 2015

Conversation

Projects
None yet
2 participants
@joschi
Contributor

joschi commented Oct 13, 2015

This PR adds an extractor which supports replacing a message field with a constant value or the matches of a regular expression.

Similar to the already existing Regex extractor, this extractor tries to match a regular expression against a message field (see Pattern) and replaces its value (or the value of the target field) with the string configured in the "replacement" setting (see Matcher#replaceAll()). The extractor also allows to only replace the first match or all matches (default).

Supersedes #1466.

@joschi joschi added this to the 1.3.0 milestone Oct 13, 2015

@edmundoa edmundoa self-assigned this Oct 14, 2015

@edmundoa

This comment has been minimized.

Member

edmundoa commented Oct 14, 2015

LGTM 👍

edmundoa added a commit that referenced this pull request Oct 14, 2015

Merge pull request #1485 from Graylog2/replace-extractor
Add regex replace extractor

@edmundoa edmundoa merged commit 399bc06 into 1.3 Oct 14, 2015

3 checks passed

ci Jenkins build graylog2-server-integration-pr 277 has succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details

@edmundoa edmundoa deleted the replace-extractor branch Oct 14, 2015

edmundoa added a commit that referenced this pull request Oct 14, 2015

Merge pull request #1485 from Graylog2/replace-extractor
Add regex replace extractor
(cherry picked from commit 399bc06)
@edmundoa

This comment has been minimized.

Member

edmundoa commented Oct 14, 2015

Also cherry-picked it to master.

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