[ receiver:<string> ] # The labels by which incoming alerts are grouped together. For example, # multiple alerts coming in for cluster=A and alertname=LatencyHigh would # be batched into a single group. # # To aggregate by all possible labels use the special value '...' as the sole label name, for example: # group_by: ['...'] # This effectively disables aggregation entirely, passing through all # alerts as-is. This is unlikely to be what you want, unless you have # a very low alert volume or your upstream notification system performs # its own grouping. # 将多个告警批量聚合到单个组中,这将完全禁用聚合,按原样传递所有告 警。例如,group_by: [...] [ group_by:'['<labelname>, ...']' ]
# Whether an alert should continue matching subsequent sibling nodes. [ continue:<boolean>|default=false ]
# DEPRECATED: Use matchers below. # A set of equality matchers an alert has to fulfill to match the node. match: [ <labelname>:<labelvalue>, ... ]
# DEPRECATED: Use matchers below. # A set of regex-matchers an alert has to fulfill to match the node. match_re: [ <labelname>:<regex>, ... ]
# A list of matchers that an alert has to fulfill to match the node. matchers: [ -<matcher>... ]
# How long to initially wait to send a notification for a group # of alerts. Allows to wait for an inhibiting alert to arrive or collect # more initial alerts for the same group. (Usually ~0s to few minutes.) # If omitted, child routes inherit the group_wait of the parent route. # 当一个新的告警组被创建时,至少要等待'group_wait'时间来发送初始通知 # 可以确保有足够多的时间为同一分组获取多条告警,然后一起触发这些告警信息 [ group_wait:<duration>|default=30s ]
# How long to wait before sending a notification about new alerts that # are added to a group of alerts for which an initial notification has # already been sent. (Usually ~5m or more.) If omitted, child routes # inherit the group_interval of the parent route. # 在发送完第一条告警以后,等待group_interval时间来发送一组新的告警信息 [ group_interval:<duration>|default=5m ]
# How long to wait before sending a notification again if it has already # been sent successfully for an alert. (Usually ~3h or more). If omitted, # child routes inherit the repeat_interval of the parent route. # Note that this parameter is implicitly bound by Alertmanager's # `--data.retention` configuration flag. Notifications will be resent after either # repeat_interval or the data retention period have passed, whichever # occurs first. `repeat_interval` should be a multiple of `group_interval`. # 如果告警已成功发送,则等待'repeat_interval'时间重新发送它们 [ repeat_interval:<duration>|default=4h ]
# Times when the route should be muted. These must match the name of a # mute time interval defined in the mute_time_intervals section. # Additionally, the root node cannot have any mute times. # When a route is muted it will not send any notifications, but # otherwise acts normally (including ending the route-matching process # if the `continue` option is not set.) mute_time_intervals: [ -<string>...]
# Times when the route should be active. These must match the name of a # time interval defined in the time_intervals section. An empty value # means that the route is always active. # Additionally, the root node cannot have any active times. # The route will send notifications only when active, but otherwise # acts normally (including ending the route-matching process # if the `continue` option is not set). active_time_intervals: [ -<string>...]
# Zero or more child routes. routes: [ -<route>... ] -receiver:'database-pager' group_wait:10s match_re: service:mysql|cassandra -receiver:'frontend-pager' group_by: [product, environment] match: team:frontend
inhibit_rule模块
# DEPRECATED: Use target_matchers below. # Matchers that have to be fulfilled in the alerts to be muted. # 必须在告警中完成的匹配器被静默 target_match: [ <labelname>:<labelvalue>, ... ] # DEPRECATED: Use target_matchers below. target_match_re: [ <labelname>:<regex>, ... ]
# A list of matchers that have to be fulfilled by the target # alerts to be muted. target_matchers: [ -<matcher>... ]
# DEPRECATED: Use source_matchers below. # Matchers for which one or more alerts have to exist for the # inhibition to take effect. # 必须存在一个或多个告警才能使抑制生效的匹配器 source_match: [ <labelname>:<labelvalue>, ... ] # DEPRECATED: Use source_matchers below. source_match_re: [ <labelname>:<regex>, ... ]
# A list of matchers for which one or more alerts have # to exist for the inhibition to take effect. source_matchers: [ -<matcher>... ]
# Labels that must have an equal value in the source and target # alert for the inhibition to take effect. # 必须在源告警和目标告警中具有相等值的标签才能使抑制生效 [ equal:'['<labelname>, ...']' ]