Interview Prep/Monitoring & Observability/PromQL and recording rules

`found duplicate series for the match group {pod="api-1"} on the right hand-side of the operation`

IntermediateTroubleshootingPromQL and recording rules
Answer

Likely causes → group_left expects one series per match group on the right; there are two (e.g. different instance or job labels from two scrape paths).

Diagnose → Run the right-hand side alone and look for duplicates on the on(...) labels.

Fix → Reduce the right side with max by (pod, <labels you need>), or add the differing label to on(...).

Prevent → Avoid scraping the same exporter through two jobs.

All Monitoring & Observability questions Roadmap: Monitoring & alerting

More on PromQL and recording rules