How netbox calculate power draw of a rack? #14513
-
I'm trying to get Netbox to calculate the sum of the predefined power consumption of all devices in the current rack, I've tried doing the following list of things:
So far, the rack preview page successfully displays that the current rack power consumption is equal to the power consumption defined in the PDU, I don't quite understand what happened next. hope someone can point me to the correct approach.
For example: A device have a 400Watts power port, connect it to PDU's outlet #1, In the rack preview page, nothing changed, seems like it didn't caculate the 400Watts to " rack overall power consumption", and the device preview page of the PDU also shows no change on the power. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 6 replies
-
Sorry, my english is kinda poor, and huge thanks for everyone who volunteer to help, cheers! |
Beta Was this translation helpful? Give feedback.
-
The short answer is it's not well documented. For a long answer (from reverse-engineering the code) see #12837 I believe that rack-level power figures only consider devices which draw from Power feeds which are explicitly assigned to that particular rack. I have found it easier to ignore Netbox's built-in power summarisation, and instead write Custom Reports to do what I want. Actually they are Custom Scripts, because I wanted them to take parameters, and reports don't allow this. https://github.com/netbox-community/customizations/blob/master/scripts/power_summary.py |
Beta Was this translation helpful? Give feedback.
If you define power utilization at the PDU power port level, then it overrides the calculation from the power outlets.
You must leave both the allocated_draw and maximum_draw on the PDU power port empty (null) to enable the summing of usage of devices connected to power outlets.
This is as described in #12837: