harbor-helm icon indicating copy to clipboard operation
harbor-helm copied to clipboard

Harbor metrics exporter

Open tnubeo1111 opened this issue 1 year ago • 4 comments

Hello team,

Currently I am setting up harbor version 2.11.0 using helm but now I want to enable harbor metrics and transfer metrics to another prometheus server, what should I do? I followed the docs but it still doesn't work

Hope the team can help.

tnubeo1111 avatar Jul 18 '24 12:07 tnubeo1111

You need to provide more info. How did you deploy it, where, what did you try?

Kajot-dev avatar Jul 18 '24 21:07 Kajot-dev

Thank you for responding.

Currently I have installed and configured Harbor (v2.11.0) using helm in a k8s cluster that specializes in providing services on it.

Next there is a k8s cluster that specializes in monitoring.

Then I went to the harbor's values ​​file to configure metrics.enable=true to configure metrics. But I see that it is currently configuring port 8001 and the path is /metrics, which means it is active in pods. If I want to see the harbor's metrics, I have to build an additional prometheus in the harbor's k8s cluster to see it.

But now that I have built a prometheus in a completely different cluster from the harbor, can I ask if there is a way for a prometheus in another cluster to get the metrics of the harbor?

I just have an idea to create a new service about NodePort and then add the labels of the exporter app.kubernetes.io/component: exporter, I don't know if that's possible.

tnubeo1111 avatar Jul 19 '24 00:07 tnubeo1111

You would need to expose it somehow. Either via separate Ingress (since Ingress only listens on http/s) or via NodePort/Loadbalancer service.

Although sending metric between the clusters does not make much sense to me, escpecially from the security standpoint. It would be much better to for example use Prometheus Operator which provides neat CRD like ServiceMonitor, PrometheusRule just for that + AlertManager for notifications

Kajot-dev avatar Jul 26 '24 16:07 Kajot-dev

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.

github-actions[bot] avatar Sep 25 '24 09:09 github-actions[bot]

This issue was closed because it has been stalled for 30 days with no activity. If this issue is still relevant, please re-open a new issue.

github-actions[bot] avatar Oct 26 '24 09:10 github-actions[bot]