Skip to content

Commit

Permalink
Merge pull request #10 from Gaardsholt/master
Browse files Browse the repository at this point in the history
ConstraintInformation value
  • Loading branch information
Knappek authored Apr 26, 2022
2 parents 5a210e5 + 539db37 commit 0dda91b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion exporter-go/pkg/opa/prometheus.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ func ExportViolations(constraints []Constraint) []prometheus.Metric {
func ExportConstraintInformation(constraints []Constraint) []prometheus.Metric {
m := make([]prometheus.Metric, 0)
for _, c := range constraints {
metric := prometheus.MustNewConstMetric(ConstraintInformation, prometheus.GaugeValue, 1, c.Meta.Kind, c.Meta.Name, c.Spec.EnforcementAction, fmt.Sprintf("%f", c.Status.TotalViolations))
metric := prometheus.MustNewConstMetric(ConstraintInformation, prometheus.GaugeValue, c.Status.TotalViolations, c.Meta.Kind, c.Meta.Name, c.Spec.EnforcementAction, fmt.Sprintf("%f", c.Status.TotalViolations))
m = append(m, metric)
}
return m
Expand Down

0 comments on commit 0dda91b

Please sign in to comment.