Make the prefix utilisation display user-configurable #5895

Closed
opened 2025-12-29 19:33:57 +01:00 by adam · 6 comments
Owner

Originally created by @nogaff on GitHub (Jan 6, 2022).

NetBox version

3.0.10

Feature type

Change to existing functionality

Proposed functionality

Add an option to toggle the prefix utilisation display between "True utilisation" and "Effective utilisation".

Effective utilisation would simply retain the existing behaviour of the display, where all child IP ranges are assumed to be fully utilised. This should be the default display to avoid any confusion when upgrading from previous NetBox versions.

True utilisation would switch to an alternate display where the utilisation is calculated based on the individual utilisations of the child IP ranges, (taking into account any ranges which have explicitly been marked as fully utilised).

Ideally this toggle should appear both on the main prefix list and also on the detail pages for individual prefixes. The state of the toggle should persist as the user navigates around the prefixes.

Use case

Currently the calculation for prefix utilisation assumes that all child IP ranges are fully utilised, but this behaviour may not be desirable, depending on how the IP ranges are being used and what kind of insight the NetBox user is looking to gain.

#7947 highlighted two opposing use cases which cannot both be satisfied by the current behaviour, namely:

  1. Seeing which prefixes have spare capacity for new IP ranges of a given size. (Currently possible).
  2. Seeing which prefixes have most of their IP addresses consumed by known devices and may need to be expanded. (Currently not possible if any child IP ranges have been defined).

In the second use case, the assumption that an IP range has 100% utilisation is problematic because IP ranges could be used to partition a prefix into smaller sections, and the user may wish to document the purposes of those sections in NetBox, thus "filling up" the prefix with IP ranges. However, a large proportion of the IP addresses within those ranges could go unused for considerable periods of time, and the prefix utilisation will not reflect this, always appearing to be fully utilised even with a small number of consumed IP addresses.

The only way to get the desired information is to manually add up the utilisations of the individual IP ranges, which is easier said than done if you have a large number of ranges, all with different sizes. Right now, it's actually far less hassle to simply not document the IP ranges, so that the prefix utilisation is based purely on IP addresses, which seems contrary to NetBox's core philosophies of Replicating the Real World and Serving as a Source of Truth.

The proposed "Effective/True utilisation" toggle would neatly allow for both use cases without any untruthful usage of the "Fully utilised" checkbox on the IP ranges.

Database changes

No response

External dependencies

No response

Originally created by @nogaff on GitHub (Jan 6, 2022). ### NetBox version 3.0.10 ### Feature type Change to existing functionality ### Proposed functionality Add an option to toggle the prefix utilisation display between "True utilisation" and "Effective utilisation". **Effective utilisation** would simply retain the existing behaviour of the display, where all child IP ranges are assumed to be fully utilised. This should be the default display to avoid any confusion when upgrading from previous NetBox versions. **True utilisation** would switch to an alternate display where the utilisation is calculated based on the individual utilisations of the child IP ranges, (taking into account any ranges which have explicitly been marked as fully utilised). Ideally this toggle should appear both on the main prefix list and also on the detail pages for individual prefixes. The state of the toggle should persist as the user navigates around the prefixes. ### Use case Currently the calculation for prefix utilisation assumes that all child IP ranges are fully utilised, but this behaviour may not be desirable, depending on how the IP ranges are being used and what kind of insight the NetBox user is looking to gain. #7947 highlighted two opposing use cases which cannot both be satisfied by the current behaviour, namely: 1. Seeing which prefixes have spare capacity for new IP ranges of a given size. (Currently possible). 2. Seeing which prefixes have most of their IP addresses consumed by known devices and may need to be expanded. (Currently not possible if any child IP ranges have been defined). In the second use case, the assumption that an IP range has 100% utilisation is problematic because IP ranges could be used to partition a prefix into smaller sections, and the user may wish to document the purposes of those sections in NetBox, thus "filling up" the prefix with IP ranges. However, a large proportion of the IP addresses within those ranges could go unused for considerable periods of time, and the prefix utilisation will not reflect this, always appearing to be fully utilised even with a small number of consumed IP addresses. The only way to get the desired information is to manually add up the utilisations of the individual IP ranges, which is easier said than done if you have a large number of ranges, all with different sizes. Right now, it's actually far less hassle to simply **not** document the IP ranges, so that the prefix utilisation is based purely on IP addresses, which seems contrary to NetBox's core philosophies of [Replicating the Real World](https://netbox.readthedocs.io/en/stable/#replicate-the-real-world) and [Serving as a Source of Truth](https://netbox.readthedocs.io/en/stable/#serve-as-a-source-of-truth). The proposed "Effective/True utilisation" toggle would neatly allow for both use cases without any untruthful usage of the "Fully utilised" checkbox on the IP ranges. ### Database changes _No response_ ### External dependencies _No response_
adam added the type: featurepending closurestatus: under review labels 2025-12-29 19:33:57 +01:00
adam closed this issue 2025-12-29 19:33:57 +01:00
Author
Owner

@github-actions[bot] commented on GitHub (Mar 9, 2022):

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.

@github-actions[bot] commented on GitHub (Mar 9, 2022): 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

@github-actions[bot] commented on GitHub (Apr 9, 2022):

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.

@github-actions[bot] commented on GitHub (Apr 9, 2022): 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.
Author
Owner

@jeremystretch commented on GitHub (Mar 1, 2023):

Re-opening this for discussion now that #7947 has been implemented for the upcoming v3.5 release.

@jeremystretch commented on GitHub (Mar 1, 2023): Re-opening this for discussion now that #7947 has been implemented for the upcoming v3.5 release.
Author
Owner

@nikolasj commented on GitHub (Apr 17, 2023):

This is a much needed functionality.
Now I can fetch utilization data by prefixes using https://github.com/TheDJVG/netbox-more-metrics . But the information is irrelevant. I need to understand the true filling of IP addresses. But I can’t pick up utilization by ip range.

The described functionality would solve my problems.

@nikolasj commented on GitHub (Apr 17, 2023): This is a much needed functionality. Now I can fetch utilization data by prefixes using https://github.com/TheDJVG/netbox-more-metrics . But the information is irrelevant. I need to understand the true filling of IP addresses. But I can’t pick up utilization by ip range. The described functionality would solve my problems.
Author
Owner

@github-actions[bot] commented on GitHub (Jul 17, 2023):

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. Do not attempt to circumvent this process by "bumping" the issue; doing so will result in its immediate closure and you may be barred from participating in any future discussions. Please see our contributing guide.

@github-actions[bot] commented on GitHub (Jul 17, 2023): 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. **Do not** attempt to circumvent this process by "bumping" the issue; doing so will result in its immediate closure and you may be barred from participating in any future discussions. Please see our [contributing guide](https://github.com/netbox-community/netbox/blob/develop/CONTRIBUTING.md).
Author
Owner

@github-actions[bot] commented on GitHub (Aug 17, 2023):

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.

@github-actions[bot] commented on GitHub (Aug 17, 2023): 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#5895