All alarms were working until we set a source regex for the management modules and the alarms went into an "Unknown" status after that. The regex was meant to exclude some of the agents and it seemed to work (the metric groups didn't list the unneeded metrics any more)
(?!.*hello-saas-home.*).*
As per design, the metric sorter will optimize regular expressions for matching, and it will treat capturing groups and non capturing groups in the regular expression differently, and in this process, as the current regular expression under question "(?!.*hello-saas-home.*).*" is a capturing group and ends with '.*', as metric sorter is interested only in matching and not interested in capturing and assigning ids to the groups, it will ignore the braces and evaluate only the content inside the braces for matching. In this case as it is a Negative Lookahead
(?!) the inner content starts with ?, thus is not a valid regex, the spec (alert definition) is not evaluated for all the metrics.