Closed cmur2 closed 8 months ago
interesting .. what does N/R
mean in this case?
interesting .. what does
N/R
mean in this case?
Sadly I don't know that, since N/R
looks similar to N/A
("not available") so it could be anything like "Not Restricted" orso...
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.
@cmur2 can you try v1.13.2 or helm chart prometheus-artifactory-exporter-0.6.1. You should not see warning messages if the log level set to info
Will do and report back (maybe already tomorrow), thanks!
You should not see warning messages if the log level set to info
I am not sure how that is supposed to work as warnings are a higher priority than informations and thus would still appear?
I don't see a recent code change that would switch this behavior so not sure why it would behave differently now - can you explain?
I deployed version https://github.com/peimanja/artifactory_exporter/releases/tag/v1.13.2 just now and still see a steady flow of messages like: level=warn ts=2023-06-06T07:24:21.101Z caller=system.go:41 msg="Couldn't parse Artifactory license ValidThrough" err="parsing time \"N/R\" as \"Jan 2, 2006\": cannot parse \"N/R\" as \"Jan\""
yeah okay we can handle this issue then
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.
The code in https://github.com/peimanja/artifactory_exporter/blob/d34c1c0e0dc0743edcccab3b79b0edfd5ab1f5e1/collector/system.go#L41 will issue a warning message every time it fails to parse the expiry date, example log message:
level=warn ts=2023-04-18T10:27:38.129Z caller=system.go:41 msg="Couldn't parse Artifactory license ValidThrough" err="parsing time \"N/R\" as \"Jan 2, 2006\": cannot parse \"N/R\" as \"Jan\""
How can this be improved to avoid spamming the logs with a non-useful message?
This is how the metrics looks like in Prometheus:
artifactory_system_license{expires="N/R", licensed_to="Artifactory Online Dedicated", node_id="foo", type="enterprise"}
Before parsing it could be checked for example whether
validThroughTime == "N/R"
and then usevalidThrough = timeNow
but without emitting a warning - should I raise a PR for this?