Skip to content

Commit

Permalink
add field suspended for organizations
Browse files Browse the repository at this point in the history
  • Loading branch information
fredga authored and benjaminguttmann-avtq committed Jan 9, 2024
1 parent ff6085e commit 74f2b5b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion collectors/organizations.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package collectors

import (
"fmt"
"strconv"
"time"

"code.cloudfoundry.org/cli/resources"
Expand Down Expand Up @@ -45,7 +46,7 @@ func NewOrganizationsCollector(
Help: "Labeled Cloud Foundry Organization information with a constant '1' value.",
ConstLabels: prometheus.Labels{"environment": environment, "deployment": deployment},
},
[]string{"organization_id", "organization_name", "quota_name"},
[]string{"organization_id", "organization_name", "quota_name", "suspended"},
)

organizationNonBasicServicesAllowedMetric := prometheus.NewGaugeVec(
Expand Down Expand Up @@ -327,6 +328,7 @@ func (c OrganizationsCollector) reportOrg(org resources.Organization, objs *mode
org.GUID,
org.Name,
quotaName,
strconv.FormatBool(org.Suspended),

Check failure on line 331 in collectors/organizations.go

View workflow job for this annotation

GitHub Actions / tests

org.Suspended undefined (type "code.cloudfoundry.org/cli/resources".Organization has no field or method Suspended)

Check failure on line 331 in collectors/organizations.go

View workflow job for this annotation

GitHub Actions / linter

org.Suspended undefined (type "code.cloudfoundry.org/cli/resources".Organization has no field or method Suspended) (typecheck)

Check failure on line 331 in collectors/organizations.go

View workflow job for this annotation

GitHub Actions / linter

org.Suspended undefined (type "code.cloudfoundry.org/cli/resources".Organization has no field or method Suspended)) (typecheck)
).Set(float64(1))

return nil
Expand Down

0 comments on commit 74f2b5b

Please sign in to comment.