Cluster usage fields #7413

Closed
opened 2025-12-29 20:23:05 +01:00 by adam · 3 comments
Owner

Originally created by @abhi1693 on GitHub (Dec 22, 2022).

NetBox version

v3.4.0

Feature type

Data model extension

Proposed functionality

Add new fields for CPU, memory, and disk to the cluster model. When a user views the cluster page, they should see the current usage vs total allocated in human-readable form. The usage fields can be cached fields or computed fields and should not be editable directly by a human.

Similar information should be provided over the API (maybe using bytes?).

The fields can remain optional to provide backward functionality.

Use case

When clusters are created for virtualization, they need to be planned with the what devices they will contain and how much total capacity is required. When the cluster is put into use, over time the capacity starts to deplete based on the virtual machines deployed within the said cluster. It will be helpful from the perspective of capacity planning to get the current usage vs total usage in both the UI and the API.

Database changes

vcpus - positive integer, optional, help_text=total allocated vcpu
memory - positive decimal, optional, help_text=total allocated memory
disk - positive decimal, optional, help_text=total allocated disk

External dependencies

No response

Originally created by @abhi1693 on GitHub (Dec 22, 2022). ### NetBox version v3.4.0 ### Feature type Data model extension ### Proposed functionality Add new fields for CPU, memory, and disk to the cluster model. When a user views the cluster page, they should see the current usage vs total allocated in human-readable form. The usage fields can be cached fields or computed fields and should not be editable directly by a human. Similar information should be provided over the API (maybe using bytes?). The fields can remain optional to provide backward functionality. ### Use case When clusters are created for virtualization, they need to be planned with the what devices they will contain and how much total capacity is required. When the cluster is put into use, over time the capacity starts to deplete based on the virtual machines deployed within the said cluster. It will be helpful from the perspective of capacity planning to get the current usage vs total usage in both the UI and the API. ### Database changes `vcpus` - positive integer, optional, help_text=total allocated vcpu `memory` - positive decimal, optional, help_text=total allocated memory `disk` - positive decimal, optional, help_text=total allocated disk ### External dependencies _No response_
adam added the type: featurepending closure labels 2025-12-29 20:23:05 +01:00
adam closed this issue 2025-12-29 20:23:05 +01:00
Author
Owner

@zmaster7 commented on GitHub (Dec 29, 2022):

I would almost say having cpu, memory, disk as fields on a device level would make more sense, and have it calculate the totals at the cluster level as hosts are added/removed from the cluster. However, it seems adding these fields have been brought up before under #6743, and it was determined that it wouldn't apply to all devices.

@zmaster7 commented on GitHub (Dec 29, 2022): I would almost say having cpu, memory, disk as fields on a device level would make more sense, and have it calculate the totals at the cluster level as hosts are added/removed from the cluster. However, it seems adding these fields have been brought up before under #6743, and it was determined that it wouldn't apply to all devices.
Author
Owner

@github-actions[bot] commented on GitHub (Mar 30, 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 (Mar 30, 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 (Apr 30, 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 (Apr 30, 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#7413