You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently --alert-filter-regexp will filter out items from a list of active alerts in Prometheus. If anything is left, a reboot will be blocked.
I'm hoping to match on very specific alerts and block reboots on those. so, we take the entire list and if "(A|B|C|D)" exists, then block reboots.
I spent some time trying to write something to inverse this, but without the ability to use lookahead/lookbehind (this isnt supported in https://github.com/google/re2/wiki/Syntax) I couldnt get anything to work out.
Let me know if this is interesting/on a list somewhere. I could take a stab at a PR if there's interest.
edit: Could even be as simple as we add a parameter to control if alert-filter-regexp is an inverse match or not. (default being current behavior of inverse)
The text was updated successfully, but these errors were encountered:
Hi @jimliming,
thanks for opening this issue. Yeah, I think it would make sense to add a parameter which would invert the logic the regex-result is processed. Would you mind opening a PR?
Currently
--alert-filter-regexp
will filter out items from a list of active alerts in Prometheus. If anything is left, a reboot will be blocked.I'm hoping to match on very specific alerts and block reboots on those. so, we take the entire list and if "(A|B|C|D)" exists, then block reboots.
I spent some time trying to write something to inverse this, but without the ability to use lookahead/lookbehind (this isnt supported in https://github.com/google/re2/wiki/Syntax) I couldnt get anything to work out.
Let me know if this is interesting/on a list somewhere. I could take a stab at a PR if there's interest.
edit: Could even be as simple as we add a parameter to control if
alert-filter-regexp
is an inverse match or not. (default being current behavior of inverse)The text was updated successfully, but these errors were encountered: