diff --git a/python-pulumi/src/ptd/pulumi_resources/grafana_alloy.py b/python-pulumi/src/ptd/pulumi_resources/grafana_alloy.py index 84c51d6..874fa33 100644 --- a/python-pulumi/src/ptd/pulumi_resources/grafana_alloy.py +++ b/python-pulumi/src/ptd/pulumi_resources/grafana_alloy.py @@ -493,12 +493,27 @@ def _define_config_map( prometheus.scrape "blackbox" {{ targets = prometheus.exporter.blackbox.front_door.targets - forward_to = [prometheus.relabel.default.receiver] + forward_to = [prometheus.relabel.blackbox.receiver] clustering {{ enabled = true }} }} + // Normalize instance label for blackbox metrics to deduplicate across Alloy pods. + // Each pod runs its own blackbox exporter, producing metrics with different + // instance labels (node hostnames). Replacing instance with a static value + // ensures Mimir deduplicates them, preventing duplicate alerts. + // See: https://github.com/grafana/alloy/issues/1009 + prometheus.relabel "blackbox" {{ + forward_to = [prometheus.relabel.default.receiver] + + rule {{ + action = "replace" + target_label = "instance" + replacement = "blackbox" + }} + }} + prometheus.scrape "pods" {{ targets = discovery.relabel.pod_metrics.output forward_to = [prometheus.relabel.default.receiver]