mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Alerting: Allow more characters in label names so notifications are sent (#38629)
Remove validation for labels to be accepted in the Alertmanager, This helps with datasources that produce non-compatible labels. Adds an "object_matchers" to alert manager routers so we can support labels names with extended characters beyond prometheus/openmetrics. It only does this for the internal Grafana managed Alert Manager. This requires a change to alert manager, so for now we use grafana/alertmanager which is a slight fork, with the intention of going back to upstream. The frontend handles the migration of "matchers" -> "object_matchers" when the route is edited and saved. Once this is done, downgrades will not work old versions will not recognize the "object_matchers". Co-authored-by: Kyle Brandt <kyle@grafana.com> Co-authored-by: Nathan Rodman <nathanrodman@gmail.com>
This commit is contained in:
@@ -89,12 +89,17 @@ export type Receiver = {
|
||||
[key: string]: any;
|
||||
};
|
||||
|
||||
type ObjectMatcher = [name: string, operator: MatcherOperator, value: string];
|
||||
|
||||
export type Route = {
|
||||
receiver?: string;
|
||||
group_by?: string[];
|
||||
continue?: boolean;
|
||||
object_matchers?: ObjectMatcher[];
|
||||
matchers?: string[];
|
||||
/** @deprecated use `object_matchers` */
|
||||
match?: Record<string, string>;
|
||||
/** @deprecated use `object_matchers` */
|
||||
match_re?: Record<string, string>;
|
||||
group_wait?: string;
|
||||
group_interval?: string;
|
||||
|
||||
Reference in New Issue
Block a user