peimanja / artifactory_exporter

JFrog Artifactory Prometheus Exporter written in Go
Apache License 2.0
141 stars 37 forks source link

Unable to parse license result with latest OSS version #28

Closed ggatward closed 4 years ago

ggatward commented 4 years ago

Artifactory OSS (7.3.2) causes parse error in the license validation metric. Using artifactory_exporter v0.5.1 on linux_amd64

level=warn ts=2020-04-09T05:04:35.429Z caller=collector.go:212 msg="Can't parse Artifactory license ValidThrough" err="parsing time \"\" as \"Jan 2, 2006\": cannot parse \"\" as \"Jan\""

Debug log: root@ip-10-100-2-28[~] # /usr/local/bin/artifactory_exporter --log.level=debug level=info ts=2020-04-09T05:17:27.906Z caller=main.go:30 msg="Listening on address" address=:9531 level=debug ts=2020-04-09T05:17:31.695Z caller=system.go:51 msg="Fetching license stats" level=debug ts=2020-04-09T05:17:31.695Z caller=collector.go:151 msg="Fetching http" path=http://localhost:8081/artifactory/api/system/license level=debug ts=2020-04-09T05:17:31.727Z caller=system.go:10 msg="Fetching health stats" level=debug ts=2020-04-09T05:17:31.727Z caller=collector.go:151 msg="Fetching http" path=http://localhost:8081/artifactory/api/system/ping level=debug ts=2020-04-09T05:17:31.731Z caller=system.go:17 msg="System ping returned OK" level=debug ts=2020-04-09T05:17:31.731Z caller=system.go:30 msg="Fetching build stats" level=debug ts=2020-04-09T05:17:31.731Z caller=collector.go:151 msg="Fetching http" path=http://localhost:8081/artifactory/api/system/version level=warn ts=2020-04-09T05:17:31.732Z caller=collector.go:212 msg="Can't parse Artifactory license ValidThrough" err="parsing time \"\" as \"Jan 2, 2006\": cannot parse \"\" as \"Jan\"" level=debug ts=2020-04-09T05:17:31.732Z caller=storage.go:71 msg="Fetching storage info stats" level=debug ts=2020-04-09T05:17:31.732Z caller=collector.go:151 msg="Fetching http" path=http://localhost:8081/artifactory/api/storageinfo level=debug ts=2020-04-09T05:17:31.736Z caller=storage.go:187 msg="Extracting repo summeriest"

peimanja commented 4 years ago

Thanks for reporting the issue. I will look into it.