Open matschaffer opened 2 years ago
Indeed the intention is to match the end bracket, example log
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.
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!
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..
Still seeing this as of June 2024
https://github.com/elastic/integrations/blob/ce91bf3b69b7e2060bd1da25b5bc609b3c57ba01/packages/nginx_ingress_controller/data_stream/error/elasticsearch/ingest_pipeline/default.yml#L17 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: https://github.com/elastic/integrations/pull/472 Rel: https://github.com/elastic/integrations/issues/467