Skip to content

Commit 0603722

Browse files
authored
Updated log line for IP Usage metrics. (#1961)
Added the pendingprogramming and pendingrelease count in the log line.
1 parent e9ddb87 commit 0603722

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

cns/restserver/ipusage.go

+12-4
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,11 @@ func (service *HTTPRestService) buildIPState() *ipState {
2323
defer service.Unlock()
2424

2525
state := ipState{
26-
allocatedIPs: 0,
27-
assignedIPs: 0,
28-
availableIPs: 0,
26+
allocatedIPs: 0,
27+
assignedIPs: 0,
28+
availableIPs: 0,
29+
programmingIPs: 0,
30+
releasingIPs: 0,
2931
}
3032

3133
//nolint:gocritic // This has to iterate over the IP Config state to get the counts.
@@ -45,6 +47,12 @@ func (service *HTTPRestService) buildIPState() *ipState {
4547
}
4648
}
4749

48-
logger.Printf("[IP Usage] allocated IPs: %d, assigned IPs: %d, available IPs: %d", state.allocatedIPs, state.assignedIPs, state.availableIPs)
50+
logger.Printf("[IP Usage] Allocated IPs: %d, Assigned IPs: %d, Available IPs: %d, PendingProgramming IPs: %d, PendingRelease IPs: %d",
51+
state.allocatedIPs,
52+
state.assignedIPs,
53+
state.availableIPs,
54+
state.programmingIPs,
55+
state.releasingIPs,
56+
)
4957
return &state
5058
}

0 commit comments

Comments
 (0)