Skip to content
Discussion options

You must be logged in to vote

Scrubbed it by using regex and replace function.

[transforms.aws_alb_logs_transform]
type = "remap"
inputs = ["aws_alb_logs"]
drop_on_error = false
source = '''
. = parse_aws_alb_log!(replace(replace(string!(.message),
    r'([a-zA-Z0-9._-]+@[a-zA-Z0-9._-]+\.[a-zA-Z0-9_-]+)', "SCRUBBED"),
    r'(d{1,3}[- ]?)?\d{10}&', "SCRUBBED&"))
.request_url_parts = parse_url!(.request_url)
'''

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@jszwedko
Comment options

Answer selected by bhushan-amit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants