Retrieve oversusbcription of IP assigment or % utilization via API #3725

Closed
opened 2025-12-29 18:30:47 +01:00 by adam · 4 comments
Owner

Originally created by @jorgeNeutrona on GitHub (May 25, 2020).

Environment

  • Python version: 3.6
  • NetBox version: 28011873b3d2 (v2.8.4)

Get subnet utilization via API for sanity check.

Proposed Functionality

I would like to retrireve % utilization of Subnet fia API REST CALL. In migration scenarios is useful when a subnet is created and has childs vs the same subnet creation of prefix /32.

For example:

192.168.0.0/26
192.168.0/29
192.168.8/29
192.168.16/29
etc.

192.168.0.1/26
192.168.0.2/26
192.168.0.3/26
192.168.0.4/26
192.168.0.5/26

etc.

Once this scenarios ocurrs the utilization is more than 100% of the subnet.

I would like to retrieve % of utilization or a way to debug or clean wrongs assignations.

Use Case

Retrieve % utilization or a way to review oversubscriptions of IP assigments.

Originally created by @jorgeNeutrona on GitHub (May 25, 2020). ### Environment * Python version: 3.6 * NetBox version: 28011873b3d2 (v2.8.4) Get subnet utilization via API for sanity check. ### Proposed Functionality I would like to retrireve % utilization of Subnet fia API REST CALL. In migration scenarios is useful when a subnet is created and has childs vs the same subnet creation of prefix /32. For example: 192.168.0.0/26 192.168.0/29 192.168.8/29 192.168.16/29 etc. 192.168.0.1/26 192.168.0.2/26 192.168.0.3/26 192.168.0.4/26 192.168.0.5/26 etc. Once this scenarios ocurrs the utilization is more than 100% of the subnet. I would like to retrieve % of utilization or a way to debug or clean wrongs assignations. ### Use Case Retrieve % utilization or a way to review oversubscriptions of IP assigments.
adam added the pending closure label 2025-12-29 18:30:47 +01:00
adam closed this issue 2025-12-29 18:30:47 +01:00
Author
Owner

@kobayashi commented on GitHub (May 26, 2020):

You can do it by calculating your subnet and result of /ipam/prefixes/{id}/available-ips/?

@kobayashi commented on GitHub (May 26, 2020): You can do it by calculating your subnet and result of `/ipam/prefixes/{id}/available-ips/`?
Author
Owner

@jorgeNeutrona commented on GitHub (May 26, 2020):

You can do it by calculating your subnet and result of /ipam/prefixes/{id}/available-ips/?

Although I can retrieve and calculate, I need to retrieve de calculated value via NETBOX. I'm was seeing some rare values when an /30 is left available between other resevation.

is the calculated value stored? or the calculation is on the fly?

@jorgeNeutrona commented on GitHub (May 26, 2020): > You can do it by calculating your subnet and result of `/ipam/prefixes/{id}/available-ips/`? Although I can retrieve and calculate, I need to retrieve de calculated value via NETBOX. I'm was seeing some rare values when an /30 is left available between other resevation. is the calculated value stored? or the calculation is on the fly?
Author
Owner

@stale[bot] commented on GitHub (Jun 9, 2020):

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. NetBox is governed by a small group of core maintainers which means not all opened issues may receive direct feedback. Please see our contributing guide.

@stale[bot] commented on GitHub (Jun 9, 2020): This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. NetBox is governed by a small group of core maintainers which means not all opened issues may receive direct feedback. Please see our [contributing guide](https://github.com/netbox-community/netbox/blob/develop/CONTRIBUTING.md).
Author
Owner

@stale[bot] commented on GitHub (Jun 16, 2020):

This issue has been automatically closed due to lack of activity. In an effort to reduce noise, please do not comment any further. Note that the core maintainers may elect to reopen this issue at a later date if deemed necessary.

@stale[bot] commented on GitHub (Jun 16, 2020): This issue has been automatically closed due to lack of activity. In an effort to reduce noise, please do not comment any further. Note that the core maintainers may elect to reopen this issue at a later date if deemed necessary.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#3725