Interview Prep/Monitoring & Observability/Prometheus scraping and targets

Prometheus logs `Error on ingesting samples with different value but same timestamp`

AdvancedTroubleshootingPrometheus scraping and targets
Answer

Likely causes → Two targets produce identical label sets after relabeling (e.g. you dropped instance or pod), or one exporter emits the same series twice with explicit timestamps.

Diagnose →

rate(prometheus_target_scrapes_sample_duplicate_timestamp_total[5m]) > 0

Check /targets for two endpoints with the same job/instance after relabeling.

Fix → Keep a unique label per target (instance, pod). Fix exporters that print a series twice.

Prevent → Never labeldrop identity labels; review relabel rules against /service-discovery output.

All Monitoring & Observability questions Roadmap: Monitoring & alerting

More on Prometheus scraping and targets