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 Feb 14, 2024
1 parent b231060 commit 33f9601
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),
).Set(float64(1))

return nil
Expand Down

0 comments on commit 33f9601

Please sign in to comment.