Portus icon indicating copy to clipboard operation
Portus copied to clipboard

Prometheus metrics

Open schancel opened this issue 8 years ago • 6 comments

Has the Portus team given any thought to implementing support for prometheus within Portus? If so, would you accept a PR to instrument support?

schancel avatar Jan 25 '17 19:01 schancel

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) ?

mssola avatar Jan 26 '17 08:01 mssola

Can do. I'll circle back to this when I get there. I can't yet answer your question :)

schancel avatar Jan 26 '17 18:01 schancel

Cool, looking forward 😋

mssola avatar Jan 27 '17 08:01 mssola

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 avatar Feb 01 '17 08:02 sandersaares

@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 ?

mssola avatar Feb 01 '17 14:02 mssola

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.

rikkuness avatar Sep 19 '18 14:09 rikkuness