I'd like to undestand why prometheus uses pulling instead of pushing?
What are the adventages of pulling over pushing?
The biggesest adventage of pulling over pushing is that we can easily tell if the service we want to monitor is down or not.
By default prometheus uses pulling, but there is a way to use push.
We can take a look at the prometheus FAQ:
Why do you pull rather than push?
Pulling over HTTP offers a number of advantages:
- You can run your monitoring on your laptop when developing changes.
- You can more easily tell if a target is down.
- You can manually go to a target and inspect its health with a web browser.
Overall, we believe that pulling is slightly better than pushing, but it should not be considered a major point when considering a monitoring system.
For cases where you must push, we offer the Pushgateway.
Other related posts I highly recomend: