Support regex in include-exclude labels#129
Conversation
|
@gianmarco-mameli Ciao, I think this should do it. Feel free to test it and give me feedback. |
|
Hi, let me try it thanks |
|
@martialblog Hi, I think I'm doing something wrong with the regex, do you have a working example? none of my tests seems to work |
|
Hi, in the unittests I'm using these |
|
I made 2 tests but I see strange behavior, even without regex 1st test with a ContainerKilled alert (2 containers killed) With no filters Working Not working 2nd test with a TargetDown alert (2 targets down) No filters ouput Not working Not working |
|
Hi, currently we only use the labels from the alert rule not the actual alert itself, so yes that might be confusing. |
|
@gianmarco-mameli I moved the include-exclude evaluation so that it checks each alert, not just the alert rule. This should make things a bit clearer and solve the issues you described. Can you confirm that? Thanks |
|
Ok thanks, i think i can test it tonight and i get back to you with a feedback |
The PR adds regex support for the include-exclude labels.
This PR also moves the include-exclude evaluation so that it checks each alert, not just the alert rule.
With this we can check the labels that are only available for the individual alert.
Fixes #127