Skip to content

Commit

Permalink
chore: add mixin extra labels and annotations option
Browse files Browse the repository at this point in the history
chore: add mixing extra alert annotations option

chore: add missing comas
  • Loading branch information
Juraj Michalek authored and jmichalek132 committed Feb 22, 2024
1 parent 7771731 commit f05a35e
Show file tree
Hide file tree
Showing 7 changed files with 152 additions and 146 deletions.
36 changes: 18 additions & 18 deletions operations/mimir-mixin/alerts/alertmanager.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@
'for': '30m',
labels: {
severity: 'critical',
},
} + $._config.alert_extra_labels_variable,
annotations: {
message: |||
%(product)s Alertmanager {{ $labels.%(per_job_label)s }}/%(alert_instance_variable)s is failing to read tenant configurations from storage.
||| % $._config,
},
} + $._config.alert_extra_annotations_variable,
},
{
alert: $.alertName('AlertmanagerRingCheckFailing'),
Expand All @@ -26,12 +26,12 @@
'for': '10m',
labels: {
severity: 'critical',
},
} + $._config.alert_extra_labels_variable,
annotations: {
message: |||
%(product)s Alertmanager {{ $labels.%(per_job_label)s }}/%(alert_instance_variable)s is unable to check tenants ownership via the ring.
||| % $._config,
},
} + $._config.alert_extra_annotations_variable,
},
{
alert: $.alertName('AlertmanagerPartialStateMergeFailing'),
Expand All @@ -41,12 +41,12 @@
'for': '10m',
labels: {
severity: 'critical',
},
} + $._config.alert_extra_labels_variable,
annotations: {
message: |||
%(product)s Alertmanager {{ $labels.%(per_job_label)s }}/%(alert_instance_variable)s is failing to merge partial state changes received from a replica.
||| % $._config,
},
} + $._config.alert_extra_annotations_variable,
},
{
alert: $.alertName('AlertmanagerReplicationFailing'),
Expand All @@ -56,12 +56,12 @@
'for': '10m',
labels: {
severity: 'critical',
},
} + $._config.alert_extra_labels_variable,
annotations: {
message: |||
%(product)s Alertmanager {{ $labels.%(per_job_label)s }}/%(alert_instance_variable)s is failing to replicating partial state to its replicas.
||| % $._config,
},
} + $._config.alert_extra_annotations_variable,,
},
{
alert: $.alertName('AlertmanagerPersistStateFailing'),
Expand All @@ -71,12 +71,12 @@
'for': '1h',
labels: {
severity: 'critical',
},
} + $._config.alert_extra_labels_variable,
annotations: {
message: |||
%(product)s Alertmanager {{ $labels.%(per_job_label)s }}/%(alert_instance_variable)s is unable to persist full state snaphots to remote storage.
||| % $._config,
},
} + $._config.alert_extra_annotations_variable,
},
{
alert: $.alertName('AlertmanagerInitialSyncFailed'),
Expand All @@ -85,38 +85,38 @@
|||,
labels: {
severity: 'critical',
},
} + $._config.alert_extra_labels_variable,
annotations: {
message: |||
%(product)s Alertmanager {{ $labels.%(per_job_label)s }}/%(alert_instance_variable)s was unable to obtain some initial state when starting up.
||| % $._config,
},
} + $._config.alert_extra_annotations_variable,
},
{
alert: $.alertName('AlertmanagerAllocatingTooMuchMemory'),
expr: $._config.alertmanager_alerts[$._config.deployment_type].memory_allocation % $._config { threshold: '0.80' },
'for': '15m',
labels: {
severity: 'warning',
},
} + $._config.alert_extra_labels_variable,
annotations: {
message: |||
Alertmanager %(alert_instance_variable)s in %(alert_aggregation_variables)s is using too much memory.
||| % $._config,
},
} + $._config.alert_extra_annotations_variable,
},
{
alert: $.alertName('AlertmanagerAllocatingTooMuchMemory'),
expr: $._config.alertmanager_alerts[$._config.deployment_type].memory_allocation % $._config { threshold: '0.90' },
'for': '15m',
labels: {
severity: 'critical',
},
} + $._config.alert_extra_labels_variable,
annotations: {
message: |||
Alertmanager %(alert_instance_variable)s in %(alert_aggregation_variables)s is using too much memory.
||| % $._config,
},
} + $._config.alert_extra_annotations_variable,,
},
{
alert: $.alertName('AlertmanagerInstanceHasNoTenants'),
Expand All @@ -134,10 +134,10 @@
'for': '1h',
labels: {
severity: 'warning',
},
} + $._config.alert_extra_labels_variable,
annotations: {
message: '%(product)s alertmanager %(alert_instance_variable)s in %(alert_aggregation_variables)s owns no tenants.' % $._config,
},
} + $._config.alert_extra_annotations_variable,
},
],
},
Expand Down
Loading

0 comments on commit f05a35e

Please sign in to comment.