I configured Prometheus to scrape data from AWS EC2 instances and Ubuntu machines, collecting information about CPU usage, memory consumption, disk utilization, network traffic, and other crucial metrics. By defining appropriate scraping intervals, I ensured the timely collection of data for accurate monitoring.