Aggegrate Custom Fields per Rack #1433

Closed
opened 2025-12-29 16:32:10 +01:00 by adam · 3 comments
Owner

Originally created by @Phhere on GitHub (Dec 1, 2017).

Issue type

[ x ] Feature request
[ ] Bug report
[ ] Documentation

Environment

  • Python version: 3.5
  • NetBox version: 2.2.6

Description

It would be nice to have an option to aggregate values of all devices inside a rack.
Example:
Power usage of Device: Sum of Power usage inside the rack
Numer of required ports: Count of required ports on patchfield

Originally created by @Phhere on GitHub (Dec 1, 2017). <!-- Before opening a new issue, please search through the existing issues to see if your topic has already been addressed. Note that you may need to remove the "is:open" filter from the search bar to include closed issues. Check the appropriate type for your issue below by placing an x between the brackets. For assistance with installation issues, or for any other issues other than those listed below, please raise your topic for discussion on our mailing list: https://groups.google.com/forum/#!forum/netbox-discuss Please note that issues which do not fall under any of the below categories will be closed. Due to an excessive backlog of feature requests, we are not currently accepting any proposals which extend NetBox's feature scope. Do not prepend any sort of tag to your issue's title. An administrator will review your issue and assign labels as appropriate. ---> ### Issue type [ x ] Feature request <!-- An enhancement of existing functionality --> [ ] Bug report <!-- Unexpected or erroneous behavior --> [ ] Documentation <!-- A modification to the documentation --> <!-- Please describe the environment in which you are running NetBox. (Be sure to verify that you are running the latest stable release of NetBox before submitting a bug report.) If you are submitting a bug report and have made any changes to the code base, please first validate that your bug can be recreated while running an official release. --> ### Environment * Python version: 3.5 * NetBox version: 2.2.6 <!-- BUG REPORTS must include: * A list of the steps needed for someone else to reproduce the bug * A description of the expected and observed behavior * Any relevant error messages (screenshots may also help) FEATURE REQUESTS must include: * A detailed description of the proposed functionality * A use case for the new feature * A rough description of any necessary changes to the database schema * Any relevant third-party libraries which would be needed --> ### Description It would be nice to have an option to aggregate values of all devices inside a rack. Example: Power usage of Device: Sum of Power usage inside the rack Numer of required ports: Count of required ports on patchfield
adam closed this issue 2025-12-29 16:32:10 +01:00
Author
Owner

@jeremystretch commented on GitHub (Dec 5, 2017):

Thank you for your interest in NetBox. It looks like your feature request is missing some information. Per the contributing guidelines, please ensure that you have provided all of the following:

  • A detailed description of the proposed functionality
  • A use case for the feature; who would use it and what value it would add to NetBox
  • A rough description of changes necessary to the database schema (if applicable)
  • Any third-party libraries or other resources which would be involved

Please update the issue so that it meets all of these requirements. If no response is received within a week, this issue will be closed. Thanks!

@jeremystretch commented on GitHub (Dec 5, 2017): Thank you for your interest in NetBox. It looks like your feature request is missing some information. Per the [contributing guidelines](https://github.com/digitalocean/netbox/blob/develop/CONTRIBUTING.md), please ensure that you have provided all of the following: * A detailed description of the proposed functionality * A use case for the feature; who would use it and what value it would add to NetBox * A rough description of changes necessary to the database schema (if applicable) * Any third-party libraries or other resources which would be involved Please update the issue so that it meets all of these requirements. If no response is received within a week, this issue will be closed. Thanks!
Author
Owner

@Phhere commented on GitHub (Dec 6, 2017):

Detailed Description:
This feature would give an overview of attributes aggregated per rack. It should be possible to add a aggregation function for some attributes and custom attributes to a rack which will take all entities inside the rack as input.
Example: count(PowerOutles), sum(Custom_Attribute_Watts)

Use Cases:
It could be used for rack planing / reservation to see how many rj45 / sfp / qsfp - ports are required on an toplevel rack switch.
It can be used to calculate the required power usage of a rack by summing up all power values of individual components inside the rack.
It can be used to count required power outlets / plugs per Rack.

Database Changes:
Not required

Third-party libraries.
Not required

I hope these information help you

@Phhere commented on GitHub (Dec 6, 2017): Detailed Description: This feature would give an overview of attributes aggregated per rack. It should be possible to add a aggregation function for some attributes and custom attributes to a rack which will take all entities inside the rack as input. Example: count(PowerOutles), sum(Custom_Attribute_Watts) Use Cases: It could be used for rack planing / reservation to see how many rj45 / sfp / qsfp - ports are required on an toplevel rack switch. It can be used to calculate the required power usage of a rack by summing up all power values of individual components inside the rack. It can be used to count required power outlets / plugs per Rack. Database Changes: Not required Third-party libraries. Not required I hope these information help you
Author
Owner

@jeremystretch commented on GitHub (Dec 7, 2017):

This wouldn't really be practical to implement. NetBox doesn't know the purpose of a custom field, only it data type. Some metrics make sense to aggregate whereas others don't. Attempting this natively in NetBox would result in a lot of gargbage data (and probably a good bit of overhead). You're better off using the API to pull exactly what data you want from NetBox in an intelligent manner.

@jeremystretch commented on GitHub (Dec 7, 2017): This wouldn't really be practical to implement. NetBox doesn't know the purpose of a custom field, only it data type. Some metrics make sense to aggregate whereas others don't. Attempting this natively in NetBox would result in a lot of gargbage data (and probably a good bit of overhead). You're better off using the API to pull exactly what data you want from NetBox in an intelligent manner.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#1433