This helpful for user who host Harbor as a service.
Harbor does not expose any metrics. As the registry will be a crucial piece of our pipeline (and offering) it will be subjected to an SLA and we'll need some internal metrics published over Prometheus (our monitoring solution). We must be able to quickly diagnose problems and eventually page SRE engineers.
I'm pretty sure Prometheus-compatible metrics exposure is almost a requirement in 2018 for project adoption. ๐ค
+1
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
+1
This will be really helpful if harbor expose the metrics which will give insights of the harbor. @reasonerjt
any update for this in roadmap activities..?
Definitely on our roadmap and we hope to get to it as soon as possible. If anyone is interested in contributing please let me know. :smile:
@clouderati @reasonerjt I would love to help with this issue.๐
Hi, is there any update on this issue? I think we can introduce the prometheus format metrics to harbor as the first step (we will get the golang runtime metrics and process metrics by default), and add necessary metrics later on.
Also, I want to clarify what additional metrics we need for each harbor component, any ideas?
A good start would be amount of pulls / push with error codes to get more insight about unauthorized pulls.
You can effectively get this for "free" these days, as Docker Distribution provides Prometheus metrics since v2.7.1 (See https://github.com/docker/distribution/commit/e3c37a46e2529305ad6f5648abd6ab68c777820a and for docs: https://github.com/docker/distribution/blob/master/docs/configuration.md)
To adopt, this would imply:
a) updating the version of docker distribution (currently 2.6.4) to 2.7.1 or later.
b) an adjustment to the registry/config.yml (see linked docs)
c) updating nginx.conf (to expose the endpoint).
A good start would be amount of pulls / push with error codes to get more insight about unauthorized pulls.
does anyone know how can I query harbor(api) for pull and push operations?
+1
+1
+1
+1
I'm pretty sure the +1 messages are unhelpful and only serve to frustrate maintainers - use reactions (like ๐) instead to indicate that you're in support of this ๐
You can effectively get this for "free" these days, as Docker Distribution provides Prometheus metrics since v2.7.1
Seems that since #8003 the go.mod pulls in docker/distribution 2.7.1+, so at least part of the work is done - is anyone working on the remaining pieces?
If anyone wants to work on this issue please reach out.
I would like to work on this issue. Thanks!
+1
looking forward this issue adding in 2.0 commitments.
+1
+1
+1
I subscribed to this issue to stay informed on the developments of this feature, not to be emailed every day with another useless "+1" response kthx.
I subscribed to this issue to stay informed on the developments of this feature, not to be emailed every day with another useless "+1" response kthx.
+1
I'm building a harbor-exporter https://github.com/c4po/harbor_exporter to dump the data from harbor API to prometheus format. All suggestions are welcome.
I faced the below mentioned issue while using https://github.com/c4po/harbor_exporter.
Issue:
level=error ts=2020-03-17T13:58:20.891Z caller=harbor_exporter.go:111 msg="error gathering metrics:8 error(s) occurred:n* collected metric "harbor_quotas_count_total" { label:
@Pruthvi08 then open an issue there ๐คท๐ผโโ๏ธ
@xaleeks I am concerned that this issue is still in the backlog. Does that mean that this issue cannot be resolved until version 2.2?
@Hokwang We are still in planning stage and it didn't make it into the 2.1 release hopper unfortunately. To have a better chance of delivering this in 2.2, we need be finalizing some high level design pretty soon. Do you have some bandwidth to contribute to this as well?
+1
Hope provide the promethes exporter metrics
+1
I just saw a related article.
https://sysdig.com/blog/monitor-harbor-registry/
https://github.com/c4po/harbor_exporter
+1
I prefer the official to provide metrics directly, rather than through exporter
Everyone please feel free to chime in with your requirements, we're working on a functional spec right now. Will share more on the next community meeting, or perhaps the one after that
@xaleeks Some great metrics would be the results of the scans. So we could have alerts when vulnerabilties are found.
updated proposal is here
https://github.com/goharbor/community/pull/147
metrics that will be captured in next v2.2 release are here
https://docs.google.com/document/d/1J_jiJVdV4AOB9lf9PtN5T1LoqHlHF8SjLjI2KL17b0o/edit
+1
Most helpful comment
I'm pretty sure Prometheus-compatible metrics exposure is almost a requirement in 2018 for project adoption. ๐ค