harbor
harbor copied to clipboard
Harbor export cannot expose some indicators!
When I enable metrics indicators in harbor v2.3.5 and harbor v2.4.4, some indicators cannot be obtained. 无法获取到的指标清单: harbor_project_artifact_total harbor_task_concurrency registry_http_request_duration_seconds harbor_jobservice_task_total harbor_jobservice_task_process_time_seconds
$ curl http://192.168.2.22:9099/metrics | grep harbor_project_artifact_total null $ curl http://192.168.2.22:9099/metrics?comp=registry | grep registry_http_request_duration_seconds null $ curl http://192.168.2.22:9099/metrics?comp=jobservice | grep harbor_jobservice_task_tota null $ curl http://192.168.2.22:9099/metrics?comp=jobservice | grep harbor_jobservice_task_process_time_seconds
$ cat harbor.yml metric: enabled: true port: 9099 path: /metrics $ cat /etc/prometheus/prometheus.yml scrape_configs:
- job_name: "prometheus"
static_configs:
- targets: ["localhost:9090"]
- job_name: 'node-exporter'
static_configs:
- targets:
- '192.168.2.22:9100'
- targets:
- job_name: "harbor-exporter"
scrape_interval: 20s
static_configs:
- targets: ['192.168.2.22:9099']
- job_name: 'harbor-core'
params:
comp: ['core']
static_configs:
- targets: ['192.168.2.22:9099']
- job_name: 'harbor-registry'
params:
comp: ['registry']
static_configs:
- targets: ['192.168.2.22:9099']
- job_name: 'harbor-jobservice'
params:
comp: ['jobservice']
static_configs:
- targets: ['192.168.2.22:9099']
When the warehouse has not been operated, there will be no such indicators. For example, when there is no mirror in the harbor, the indicator harbor_project_artifact_total does not exist.
@QiuToo Do you have images or scheduled jobs in your harbor?
@QiuToo你的港口有图像或预定的工作吗? No, but I can't find this indicator in the primetheus UI.
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.
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.