goharbor / harbor

An open source trusted cloud native registry project that stores, signs, and scans content.
https://goharbor.io
Apache License 2.0
23.75k stars 4.73k forks source link

API: Resource usage statistics endpoint #6410

Open lwqcz opened 5 years ago

lwqcz commented 5 years ago

Is your feature request related to a problem? Please describe.

I know about quite a number of "quota management" related issues here on github like #6271 but the task of adding whole quota management can be quite complicated and therefore time-consuming/with later publication date. And I am quite sure that some users can be happy with the combination of resource usage statistics endpoint provided by API and some kind of automatization like disable user/remove right to publish and so on.

Describe the solution you'd like

It can be quite simple - just enhance /api/statistics endpoint to show how much space each project/repository, how much push/pull actions happens and so on. Using this data admin can decide what to do next when some conditions are met or so. Also - there is the possibility to have endpoint like /api/project//statistics for project-scope stats, /api/project//repo_name/statistics for repository-scope stats.

Describe the main design/architecture of your solution

Design/architecture is specified above and as long as this proposal is quite simple, I think that there is no need to further and deeper description.

Describe the development plan you've considered

Quite not applicable in this case.

lwqcz commented 5 years ago

Any news nearly two months later? 👼

kacole2 commented 4 years ago

bump to broaden this to a metric endpoint that can grab a roll-up of statistics. @michmike @xaleeks

Or perhaps this can now be closed since we have Quoting in place and can create a new issue to potentially add a statistics API? Thoughts?

michmike commented 4 years ago

@xaleeks we should look into this for v1.11 for sure. it is becoming a sticking point with production deployments that need observability

xaleeks commented 4 years ago

Hey Michael, I'm working on a story for this. Also comparing notes with CRE team who did some comparison against wavefront. @michmike

lwqcz commented 3 years ago

@xaleeks anything new this year? :-)

github-actions[bot] commented 2 years ago

This issue is being marked stale due to a period of inactivity. If this issue is still relevant, please comment or remove the stale label. Otherwise, this issue will close in 30 days.