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

regular expression has ']' without escape warning in nginx_ingress_controller error pipeline #3673

Open
matschaffer opened this issue Jul 11, 2022 · 5 comments
Labels
bug Something isn't working Integration:nginx_ingress_controller Nginx Ingress Controller Logs integration Label used for meta issues tracking each integration

Comments

@matschaffer
Copy link
Contributor

matschaffer commented Jul 11, 2022

- '%{LOG_LEVEL:log.level}%{MONTHNUM2:timestamp_month}%{MONTHDAY:timestamp_day} %{HOUR:timestamp_hour}:%{MINUTE:timestamp_minute}:%{SECOND:timestamp_second}.%{NANOS:timestamp_nano}%{SPACE}%{NUMBER:nginx_ingress_controller.error.thread_id} %{SOURCE_FILE:nginx_ingress_controller.error.source.file}:%{NUMBER:nginx_ingress_controller.error.source.line_number}] %{GREEDYMULTILINE:message}'
contains an unescaped ]

I'm not familiar with the integration or what's expected, but regular expressions would need ] to come after a [ or be escaped if the intention is to match a literal square bracket.

I think in this case the literal square bracket may be intended.

Rel: #472
Rel: #467

@matschaffer matschaffer added bug Something isn't working Integration:nginx_ingress_controller Nginx Ingress Controller Logs integration Label used for meta issues tracking each integration labels Jul 11, 2022
@TheRiffRafi
Copy link

Indeed the intention is to match the end bracket, example log

@matschaffer matschaffer changed the title regular expression has ']' without escape in nginx_ingress_controller error pipeline regular expression has ']' without escape warning in nginx_ingress_controller error pipeline Jul 13, 2022
@legoguy1000
Copy link
Contributor

legoguy1000 commented Jul 23, 2022

No that is fine. It will only need to be escaped if there is both open and closing bracket, then regex interprets it as a range of characters. Just a single ] isn't an issue and doesn't need to be escaped. Are u actually seeing an error somewhere? I just tested the current grok pattern without issue.

@botelastic
Copy link

botelastic bot commented Jul 23, 2023

Hi! We just realized that we haven't looked into this issue in a while. We're sorry! We're labeling this issue as Stale to make it hit our filters and make sure we get back to it as soon as possible. In the meantime, it'd be extremely helpful if you could take a look at it as well and confirm its relevance. A simple comment with a nice emoji will be enough :+1. Thank you for your contribution!

@botelastic botelastic bot added the Stalled label Jul 23, 2023
@willem-dhaese
Copy link

We have huge amount of errors like these when Elasticsearch restarts:

regular expression has ']' without escape

Seems to be related to multiple builtin ingest pipelines containing ] without escape..

@botelastic botelastic bot removed the Stalled label Oct 31, 2023
@maggieghamry
Copy link

Still seeing this as of June 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Integration:nginx_ingress_controller Nginx Ingress Controller Logs integration Label used for meta issues tracking each integration
Projects
None yet
Development

No branches or pull requests

5 participants