The Prometheus interval pulls data from the pushgateway. The pushgateway uses the “-persistence.file string” data persistence parameter configuration. The client sends data to the pushgateway in real time.
If Prometheus pulls data within the time interval. Pushgateway did not receive data from the client. What happens when Prometheus pulls data from the pushgateway interval?
- Will Prometheus pull old data outside the time interval, and then take the pull time as the time of the old data?
- Prometheus will judge according to the pull time interval, pushgateway no new data during this period, and then pull the data is empty?
- Still have other results
The Pushgateway will always serve the most recent push to it (if any) for a group. If you care about only getting very recent data then the pushgateway is not right for your use case (see https://prometheus.io/docs/practices/pushing/).
What you probably want to do is use direct instrumentation, and have Prometheus scrape your applications directly.