Skip to content

Commit

Permalink
Add additional metrics
Browse files Browse the repository at this point in the history
  • Loading branch information
nwnt authored and cadenmarchese committed Oct 27, 2023
1 parent 54bfa2b commit a6ce8b6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions pkg/monitor/azure/nsg/nsg.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ import (
)

const (
MetricPreconfiguredNSGEnabled = "monitor.preconfigurednsg.enabled"
MetricFailedNSGMonitorCreation = "monitor.preconfigurednsg.failedmonitorcreation"
MetricInvalidDenyRule = "monitor.preconfigurednsg.invaliddenyrule"
MetricSubnetAccessForbidden = "monitor.preconfigurednsg.subnetaccessforbidden"
Expand Down
1 change: 1 addition & 0 deletions pkg/monitor/worker.go
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,7 @@ func (mon *monitor) workOne(ctx context.Context, log *logrus.Entry, doc *api.Ope
var wg sync.WaitGroup

if doc.OpenShiftCluster.Properties.NetworkProfile.PreconfiguredNSG == api.PreconfiguredNSGEnabled && hourlyRun {
mon.clusterm.EmitGauge(nsg.MetricPreconfiguredNSGEnabled, int64(1), dims)
nsgMon := mon.newNSGMonitor(log, doc.OpenShiftCluster, sub.ID, sub.Subscription.Properties.TenantID, mon.clusterm, dims, &wg)
monitors = append(monitors, nsgMon)
}
Expand Down

0 comments on commit a6ce8b6

Please sign in to comment.