c4po/harbor_exporter

Version 0.5.3 crashes during operation

maxdanilov opened this issue · 2 comments

Here's the error I see after the upgrade to 0.5.3:

level=info ts=2020-09-09T10:30:07.803Z caller=harbor_exporter.go:333 CacheEnabled=false
level=info ts=2020-09-09T10:30:07.803Z caller=harbor_exporter.go:334 CacheDuration=20s
level=info ts=2020-09-09T10:30:07.803Z caller=harbor_exporter.go:336 msg="Starting harbor_exporter" version="(version=v0.5.3, branch=master, revision=738e855f8164aefa8e65b8fa996054c984fc552c)"
level=info ts=2020-09-09T10:30:07.804Z caller=harbor_exporter.go:337 build_context="(go=go1.13.15, user=root, date=2020-09-07-01:52:25-UTC)"
level=info ts=2020-09-09T10:30:07.804Z caller=harbor_exporter.go:348 metrics_group=quotas collect=true
level=info ts=2020-09-09T10:30:07.804Z caller=harbor_exporter.go:348 metrics_group=repositories collect=true
level=info ts=2020-09-09T10:30:07.804Z caller=harbor_exporter.go:348 metrics_group=replication collect=true
level=info ts=2020-09-09T10:30:07.804Z caller=harbor_exporter.go:348 metrics_group=scans collect=true
level=info ts=2020-09-09T10:30:07.804Z caller=harbor_exporter.go:348 metrics_group=statistics collect=true
level=info ts=2020-09-09T10:30:08.607Z caller=harbor_exporter.go:211 msg="check v1 with /api/systeminfo" code=404
level=info ts=2020-09-09T10:30:08.617Z caller=harbor_exporter.go:222 msg="check v2 with /api/v2.0/systeminfo" code=200
level=info ts=2020-09-09T10:30:08.617Z caller=harbor_exporter.go:386 msg="Listening on address" address=:9107
panic: send on closed channel

goroutine 75 [running]:
main.(*HarborExporter).Collect.func1(0xc00006b020, 0xc00005ea80, 0xc00015a000)
	/src/harbor_exporter.go:266 +0x90
created by main.(*HarborExporter).Collect
	/src/harbor_exporter.go:264 +0x232

0.5.2 works fine.

Harbor version: 2.0.1

Hi @c4po, do you know if this has been fixed in 0.5.4?

c4po commented

@maxdanilov this should get fixed in 0.5.4.