Interview Prep/Monitoring & Observability/Prometheus scraping and targets

node_exporter scrape takes 25 seconds on some hosts

IntermediateTroubleshootingPrometheus scraping and targets
Answer

Likely causes → A collector is stuck: filesystem on a hung NFS mount, hwmon, or a huge textfile directory.

Diagnose →

topk(5, node_scrape_collector_duration_seconds)
node_scrape_collector_success == 0
timeout 5 stat -f /mnt/nfs || echo "mount hung"

Fix → Exclude the mount: --collector.filesystem.mount-points-exclude='^/(mnt/nfs|proc|sys)($|/)', or disable the slow collector.

Prevent → Alert on per-collector duration and failures.

All Monitoring & Observability questions Roadmap: Monitoring & alerting

More on Prometheus scraping and targets