Add ability to read "Allocated Resources" for clusters over API #8050

Closed
opened 2025-12-29 20:31:44 +01:00 by adam · 4 comments
Owner

Originally created by @stavr666 on GitHub (May 13, 2023).

Originally assigned to: @arthanson on GitHub.

NetBox version

v3.5.1

Feature type

Change to existing functionality

Proposed functionality

Return calculated "Allocated Resources" values to API endpoint.

If values stored in DB, add them to endpoints:

  • /api/virtualization/clusters/
  • /api/virtualization/clusters/{$id}/

Example in current UI:
image

Returned by API:
image

Example of expected output from same datapoint:
image

Database changes, new views or API endpoints - NOT REQUIRED afaik

Use case

Availability to fast-read actual values, without GraphQL or pipelining several API queries.

Target scenarios:

  • Resource saturation monitoring per cluster (target values defined either externally or in custom fields).
  • Raw resource cost approximation for cloud tenants/projects.

Database changes

No response

External dependencies

No response

Originally created by @stavr666 on GitHub (May 13, 2023). Originally assigned to: @arthanson on GitHub. ### NetBox version v3.5.1 ### Feature type Change to existing functionality ### Proposed functionality Return calculated "Allocated Resources" values to API endpoint. If values stored in DB, add them to endpoints: - /api/virtualization/clusters/ - /api/virtualization/clusters/{$id}/ Example in current UI: ![image](https://github.com/netbox-community/netbox/assets/84839985/504f39c2-aca6-45d9-a478-724a799436a1) Returned by API: ![image](https://github.com/netbox-community/netbox/assets/84839985/8d3d42f5-9f58-400d-a48d-0fa68ac424bf) Example of expected output from same datapoint: ![image](https://github.com/netbox-community/netbox/assets/84839985/2826effe-647f-4fcc-9d0e-736f5057c034) Database changes, new views or API endpoints - NOT REQUIRED afaik ### Use case Availability to fast-read actual values, without GraphQL or pipelining several API queries. Target scenarios: - Resource saturation monitoring per cluster (target values defined either externally or in custom fields). - Raw resource cost approximation for cloud tenants/projects. ### Database changes _No response_ ### External dependencies _No response_
adam added the status: acceptedtype: featurecomplexity: mediumnetbox labels 2025-12-29 20:31:44 +01:00
adam closed this issue 2025-12-29 20:31:44 +01:00
Author
Owner

@jeremystretch commented on GitHub (May 15, 2023):

Thank you for your interest in extending NetBox. Unfortunately, the information you have provided does not constitute an actionable feature request. Per our contributing guide, a feature request must include a thorough description of the proposed functionality, including any database changes, new views or API endpoints, and so on. It must also include a detailed use case justifying its implementation. If you would like to elaborate on your proposal, please modify your post above. If sufficient detail is not added, this issue will be closed.

@jeremystretch commented on GitHub (May 15, 2023): Thank you for your interest in extending NetBox. Unfortunately, the information you have provided does not constitute an actionable feature request. Per our [contributing guide](https://github.com/netbox-community/netbox/blob/develop/CONTRIBUTING.md), a feature request must include a thorough description of the proposed functionality, including any database changes, new views or API endpoints, and so on. It must also include a detailed use case justifying its implementation. If you would like to elaborate on your proposal, please modify your post above. If sufficient detail is not added, this issue will be closed.
Author
Owner

@stavr666 commented on GitHub (May 16, 2023):

@jeremystretch

thorough description of the proposed functionality

Example added

detailed use case justifying its implementation

It's was justified, as I far as I can. I just wanna directly use data, that already exists in Netbox UI, in our monitoring and reporting solutions, without external resource calculation for each cluster.

P.S. Can add similar example for "clusters" datapoint (without id), if needed.

@stavr666 commented on GitHub (May 16, 2023): @jeremystretch > thorough description of the proposed functionality Example added > detailed use case justifying its implementation It's was justified, as I far as I can. I just wanna directly use data, that already exists in Netbox UI, in our monitoring and reporting solutions, without external resource calculation for each cluster. P.S. Can add similar example for "clusters" datapoint (without id), if needed.
Author
Owner

@github-actions[bot] commented on GitHub (Aug 15, 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 (Aug 15, 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 (Nov 14, 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 (Nov 14, 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).
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#8050