Interview Prep/Monitoring & Observability/Prometheus scraping and targets

All Pushgateway metrics show `instance="pushgateway:9091"` and `job="pushgateway"` instead of the pushed values

IntermediateTroubleshootingPrometheus scraping and targets
Answer

Likely causes → honor_labels is false, so the scraped job/instance labels are renamed to exported_job/exported_instance.

Diagnose → Query {exported_job!=""} and you will see the original labels.

Fix → Set honor_labels: true on the Pushgateway scrape job (or honorLabels: true in the ServiceMonitor endpoint).

Prevent → Template the Pushgateway job once and reuse it.

All Monitoring & Observability questions Roadmap: Monitoring & alerting

More on Prometheus scraping and targets