What is Prometheus and how does it collect metrics?
#Reveal answer guidance
Prometheus is an open-source monitoring and alerting system. It collects metrics via a pull model — scraping HTTP endpoints (typically /metrics) on targets at configured intervals. Targets are discovered via service discovery (Kubernetes, Consul, EC2), static configs, or file-based SD. Each scrape stores samples with labels (key-value pairs) and a timestamp. Data is stored locally on disk with a custom time-series database using the TSDB format.