`label_replace` does not change anything
IntermediateTroubleshootingPromQL and recording rules
Answer
Likely causes → The regex does not match the full value (it is anchored), or source and destination arguments are swapped.
Diagnose → Signature: label_replace(v, dst_label, replacement, src_label, regex).
Fix →
label_replace(up, "host", "$1", "instance", "([^:]+):.*")
Prevent → Test regexes on real values before saving recording rules.
More on PromQL and recording rules
A PromQL query in the UI returns `Empty query result` for a metric you can see on `/metrics`Beginner`rate(http_requests_total[1m])` returns nothing but `http_requests_total` has dataBeginner`rate()` applied to a gauge shows huge spikesBeginnerBinary operation fails: `many-to-many matching not allowed: matching labels must be unique on one side`Advanced`found duplicate series for the match group {pod="api-1"} on the right hand-side of the operation`IntermediateError ratio query returns no data during quiet hoursIntermediate