'Prometheus is scraping from offline target
i'm using Docker cAdvisor to monitor docker containers and Prometheus to scrape the cAdvisor endpoint. However, if i turn off cAdvisor and all my docker containers, Prometheus is continiung to show me actual data from the offline targets for another 5 minutes. After those 5 minute the graph-line disappears. Is this behavior intentional? And how can i change it so that when the target endpoint is not reachable, Prometheus does not show any data?
I have added an image for better understanding:

Prometheus is configured to scrape data every 5 seconds.
Thanks for help!
Solution 1:[1]
The solution is to add --query.lookback-delta=XXs as a flag when running Prometheus.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Bennet L. |
