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

field names with dots #27

Open
maja42 opened this issue Aug 7, 2019 · 2 comments
Open

field names with dots #27

maja42 opened this issue Aug 7, 2019 · 2 comments

Comments

@maja42
Copy link

maja42 commented Aug 7, 2019

It seems that the following regex is used to detect named references:

namedReference = regexp.MustCompile(`%{(\w+(?::\w+(?::\w+)?)?)}`)

This forbids field names with special characters like dots and dashes to be used. The pattern will not be detected and doesn't match - without any error message.

Especially the dot is important to stay compatible with frameworks like LogStash, whose grok-patterns heavily relies on dots within names to add some structure.

Example:

  • pattern: %{DATA:var.with.dots}
  • pattern definitions/regexes: `map[string]string{"DATA": "dat[0-9]"}
  • input: "dat123"
@srebhan
Copy link
Contributor

srebhan commented Dec 11, 2020

@vjeantet I think this is solved already with a24cc63

@vjeantet
Copy link
Owner

Hello @maja42 can you test with the last commit, and give us feedback on your case ?

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

3 participants