logpai / Drain3

A robust streaming log template miner based on the Drain algorithm

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

`extra_delimiters` does not account for prefixed/suffixed delimiters

sergiuiacob1 opened this issue · comments

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.