Monitoring Docker Hub limits with Prometheus
The problem Once upon a time, Docker decided to spoil us all developers and operators and had unlimited access to Docker Hub. You could pull as many images, as many times as your heart desired without any constraint, so we got used to it and never really thought about how good of a deal was that. Unfortunately, free and unlimited almost never go hand to hand and the day came when Docker decided to impose limits to how much you can pull from the mothership. At this point (April 2025) the limits have changed twice and the current numbers can be found at https://docs.docker.com/docker-hub/usage/. Many of us just created users for those machines with heavy docker pull usage and for most of it, it was fine. Until eventually something breaks. We started using caches where possible, but in some cases, the need for direct access was still there and therefore the need to know how much more can we pull for now and if any account had run dry. Prometheus + Alertmanager + Grafana If you've been operating services for the last decade, chances are you've meet these tools. For the uninitiated: Prometheus is used to collect metrics of your systems over time. Alertmanager Takes care of handling alerts and distributing them to the right receiver. Grafana Is used to visualize metrics, logs, traces, and by the time you read this probably other things

The problem
Once upon a time, Docker decided to spoil us all developers and operators and had unlimited access to Docker Hub. You could pull as many images, as many times as your heart desired without any constraint, so we got used to it and never really thought about how good of a deal was that.
Unfortunately, free and unlimited almost never go hand to hand and the day came when Docker decided to impose limits to how much you can pull from the mothership. At this point (April 2025) the limits have changed twice and the current numbers can be found at https://docs.docker.com/docker-hub/usage/.
Many of us just created users for those machines with heavy docker pull
usage and for most of it, it was fine. Until eventually something breaks. We started using caches where possible, but in some cases, the need for direct access was still there and therefore the need to know how much more can we pull for now and if any account had run dry.
Prometheus + Alertmanager + Grafana
If you've been operating services for the last decade, chances are you've meet these tools.
For the uninitiated:
- Prometheus is used to collect metrics of your systems over time.
- Alertmanager Takes care of handling alerts and distributing them to the right receiver.
- Grafana Is used to visualize metrics, logs, traces, and by the time you read this probably other things