Skip to content
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

Can't anonymize fields containing <ip-addr>:<port> #30

Open
pavdmyt opened this issue Jun 22, 2020 · 0 comments
Open

Can't anonymize fields containing <ip-addr>:<port> #30

pavdmyt opened this issue Jun 22, 2020 · 0 comments

Comments

@pavdmyt
Copy link
Contributor

pavdmyt commented Jun 22, 2020

I'm having multiple logs entries with ipPort field with values like this: 192.168.0.1:8080. Trying to use anonymizer with the following config does not produce desired result:

<source>
  @type dummy
  tag raw.dummy
  dummy [ {"ipPort":"10.102.3.80:5555","member_id":"12345", "mail":"[email protected]"} ]
</source>

<filter raw.**>
  @type anonymizer

  # Specify rounding address keys with comma and subnet mask
  <mask network>
    key_pattern .*
    ipv4_mask_bits  0
    ipv6_mask_bits  0
  </mask>
</filter>

<match raw.**>
  @type stdout
</match>

Gives:

2020-06-22 17:17:46.099515554 +0000 raw.dummy: {"ipPort":"10.102.3.80:5555","member_id":"12345","mail":"[email protected]"}

Probably plugin does not recognize value 10.102.3.80:5555 as an IP address, hence skips it. Is there any workaround to handle such cases?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant