2020-12-03 14:57:42 +00:00
|
|
|
{
|
|
|
|
_config+:: {
|
2021-06-07 17:54:22 +00:00
|
|
|
local c = self,
|
2020-12-03 14:57:42 +00:00
|
|
|
// alertmanagerSelector is inserted as part of the label selector in
|
|
|
|
// PromQL queries to identify metrics collected from Alertmanager
|
|
|
|
// servers.
|
|
|
|
alertmanagerSelector: 'job="alertmanager"',
|
|
|
|
|
|
|
|
// alertmanagerClusterLabels is a string with comma-separated
|
|
|
|
// labels that are common labels of instances belonging to the
|
|
|
|
// same Alertmanager cluster. Include not only enough labels to
|
|
|
|
// identify cluster members, but also all common labels you want
|
|
|
|
// to keep for resulting cluster-level alerts.
|
|
|
|
alertmanagerClusterLabels: 'job',
|
|
|
|
|
2021-06-07 17:54:22 +00:00
|
|
|
// alertmanagerNameLabels is a string with comma-separated
|
|
|
|
// labels used to identify different alertmanagers within the same
|
|
|
|
// Alertmanager HA cluster.
|
2020-12-03 14:57:42 +00:00
|
|
|
// If you run Alertmanager on Kubernetes with the Prometheus
|
|
|
|
// Operator, you can make use of the configured target labels for
|
|
|
|
// nicer naming:
|
2021-06-07 17:54:22 +00:00
|
|
|
// alertmanagerNameLabels: 'namespace,pod'
|
|
|
|
alertmanagerNameLabels: 'instance',
|
|
|
|
|
|
|
|
// alertmanagerName is an identifier for alerts. By default, it is built from 'alertmanagerNameLabels'.
|
|
|
|
alertmanagerName: std.join('/', ['{{$labels.%s}}' % [label] for label in std.split(c.alertmanagerNameLabels, ',')]),
|
2020-12-03 14:57:42 +00:00
|
|
|
|
|
|
|
// alertmanagerClusterName is inserted into annotations to name an
|
|
|
|
// Alertmanager cluster. All labels used here must also be present
|
|
|
|
// in alertmanagerClusterLabels above.
|
|
|
|
alertmanagerClusterName: '{{$labels.job}}',
|
2020-12-23 14:15:38 +00:00
|
|
|
|
|
|
|
// alertmanagerCriticalIntegrationsRegEx is matched against the
|
|
|
|
// value of the `integration` label to determine if the
|
|
|
|
// AlertmanagerClusterFailedToSendAlerts is critical or merely a
|
|
|
|
// warning. This can be used to avoid paging about a failed
|
|
|
|
// integration that is itself not used for critical alerts.
|
|
|
|
// Example: @'pagerduty|webhook'
|
|
|
|
alertmanagerCriticalIntegrationsRegEx: @'.*',
|
2021-06-07 17:54:22 +00:00
|
|
|
|
|
|
|
dashboardNamePrefix: 'Alertmanager / ',
|
|
|
|
dashboardTags: ['alertmanager-mixin'],
|
2020-12-03 14:57:42 +00:00
|
|
|
},
|
|
|
|
}
|