Skip to content

Commit c896470

Browse files
committed
Drop __replica__ label from alerts generated by HA-Prometheis
1 parent d40ee72 commit c896470

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

prometheus-ksonnet/lib/prometheus-ha-mixin.libsonnet

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,19 @@ local configMap = k.core.v1.configMap;
1212
local _config = self._config,
1313

1414
// The '__replica__' label is used by Cortex for deduplication.
15+
// We add a different one to each HA replica but remove it from
16+
// alerts to not break deduplication of alerts in the Alertmanager.
17+
prometheus_config+: {
18+
alerting+: {
19+
alert_relabel_configs+: [
20+
{
21+
regex: '__replica__',
22+
action: 'labeldrop',
23+
},
24+
],
25+
},
26+
},
27+
1528
prometheus_zero+:: {
1629
config+:: root.prometheus_config {
1730
global+: {

0 commit comments

Comments
 (0)