Portus
Portus copied to clipboard
Prometheus metrics
Has the Portus team given any thought to implementing support for prometheus within Portus? If so, would you accept a PR to instrument support?
That would be totally cool 🤓 ! But before jumping into implementing this, could you detail how would you do it (both in the UI and in the backend) ?
Can do. I'll circle back to this when I get there. I can't yet answer your question :)
Cool, looking forward 😋
Performance and usage metrics would likely be very useful, to help understand any bottlenecks in infrastructure. Some things that pop into mind immediately:
- Average pull/push speed
- Disk space used by images
- Number of images
- Locking statistics (wait time for any operations that need waiting/synchronization)
- Authentication latency/delays
It would be nice to have all the metrics counted in total, for each repository and for each team (where technically feasible to draw a distinction).
What sort of metrics does Portus measure currently? If such metrics already exist, exporting them to Prometheus might be quite simple.
@sandersaares I agree that the metrics you mention would be quite interesting. For now, Portus does not store any metrics really (we only store some actions as "activities"). That being said, Portus can forward any event from the registry through webhooks. Maybe you can use that to measure metrics from the registry ? What about using the health
and the debug
options from the registry for gathering more metrics ?
Just to throw my 2 cents in here, the registry itself recently added Prometheus metrication https://github.com/docker/distribution/blob/master/docs/configuration.md#prometheus so the only things I'd expect to see from Portus are the things over and above that, user logins, namespace and repo counters etc. A bunch of those counters could just be returning a COUNT(*)
from various DB tables for quick wins.