Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add work with Artifactory Community Edition for C/C++ #91

Merged
merged 2 commits into from
Dec 30, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion collector/collector.go
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ func (e *Exporter) scrape(ch chan<- prometheus.Metric) (up float64) {
}
licenseType = strings.ToLower(license.Type)
// Some API endpoints are not available in OSS
if licenseType != "oss" && licenseType != "jcr edition" {
if licenseType != "oss" && licenseType != "jcr edition" && licenseType != "community edition for c/c++" {
for metricName, metric := range securityMetrics {
switch metricName {
case "users":
Expand Down
2 changes: 1 addition & 1 deletion collector/system.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ func (e *Exporter) exportSystem(license artifactory.LicenseInfo, ch chan<- prome
var validThrough float64
timeNow := float64(time.Now().Unix())
switch licenseType {
case "oss", "jcr edition":
case "oss", "jcr edition", "community edition for c/c++":
validThrough = timeNow
default:
if validThroughTime, err := time.Parse("Jan 2, 2006", license.ValidThrough); err != nil {
Expand Down