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

extra_delimiters does not account for prefixed/suffixed delimiters #86

Open
sergiuiacob1 opened this issue Aug 7, 2023 · 0 comments
Open

Comments

@sergiuiacob1
Copy link

sergiuiacob1 commented Aug 7, 2023

GIVEN this string:

-demo5: Pod memory usage greater than 85%, using 108% (13GB / 12GB)!

If I run drain3 on it with no drain3.ini defined, the cluster name I get is

>>> res[0].get_template()
'Prefix: -demo5: Pod memory usage greater than 85%, using 108% (13GB / 12GB)!'

If I define extra_delimiters (among other configs) in my drain3.ini file as such:

extra_delimiters = ["_", "-"]

The cluster name I get is

>>> res[0].get_template()
'Prefix: demo5: Pod memory usage greater than <:NUM:>%, using <:NUM:>% (13GB / 12GB)!'

I would like for drain3 to retain prefixed/suffixed delimiters in this case. The issue here is that I am building some REGEX patterns based on the drain3 cluster names. The pattern demo5: Pod memory usage greater than *%, using *% (13GB / 12GB)! will not match my initial string.

Is there extra config I could do to handle this case? What I'm trying to get is the first cluster name result, but with extra_delimiters = ["_", "-"] as drain3 config.

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