Skip to content

Commit

Permalink
Make the 'for' period configurable for InconsistentRuntimeConfig alert
Browse files Browse the repository at this point in the history
  • Loading branch information
kanica-g committed May 22, 2024
1 parent 5e745db commit 3b5d75e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion operations/mimir-mixin/alerts/alerts.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ local utils = import 'mixin-utils/utils.libsonnet';
local groupStatefulSetByRolloutGroup(metricName) =
'sum without(statefulset) (label_replace(%s, "rollout_group", "$1", "statefulset", "(.*?)(?:-zone-[a-z])?"))' % metricName,

local customForPeriod = std.extVar('custom_for_period') || '1h',

local alertGroups = [
{
name: 'mimir_alerts',
Expand Down Expand Up @@ -88,7 +90,7 @@ local utils = import 'mixin-utils/utils.libsonnet';
expr: |||
count(count by(%(alert_aggregation_labels)s, %(per_job_label)s, sha256) (cortex_runtime_config_hash)) without(sha256) > 1
||| % $._config,
'for': '1h',
'for': customForPeriod,
labels: {
severity: 'critical',
},
Expand Down

0 comments on commit 3b5d75e

Please sign in to comment.