Updated log line for IP Usage metrics. (#1961)

Added the pendingprogramming and pendingrelease count in the log line.
This commit is contained in:
rsagasthya 2023-08-09 12:22:26 -07:00 коммит произвёл GitHub
Родитель e9ddb87f29
Коммит 0603722598
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
1 изменённых файлов: 12 добавлений и 4 удалений

Просмотреть файл

@ -23,9 +23,11 @@ func (service *HTTPRestService) buildIPState() *ipState {
defer service.Unlock()
state := ipState{
allocatedIPs: 0,
assignedIPs: 0,
availableIPs: 0,
allocatedIPs: 0,
assignedIPs: 0,
availableIPs: 0,
programmingIPs: 0,
releasingIPs: 0,
}
//nolint:gocritic // This has to iterate over the IP Config state to get the counts.
@ -45,6 +47,12 @@ func (service *HTTPRestService) buildIPState() *ipState {
}
}
logger.Printf("[IP Usage] allocated IPs: %d, assigned IPs: %d, available IPs: %d", state.allocatedIPs, state.assignedIPs, state.availableIPs)
logger.Printf("[IP Usage] Allocated IPs: %d, Assigned IPs: %d, Available IPs: %d, PendingProgramming IPs: %d, PendingRelease IPs: %d",
state.allocatedIPs,
state.assignedIPs,
state.availableIPs,
state.programmingIPs,
state.releasingIPs,
)
return &state
}