Greetings.
Many UPS systems have agents that can run as a service on a monitoring PC, and run a script when certain thresholds are hit.
The script could be crafted to log into the OS and do a shut down, or run a powershell script that logged into the UCSM and powered the blade down gracefully.
The CIMCs in the blades can also have IPMI access configured if the UPS system/agents can use IPMI over network to issue power down commands.
The actual mechanism/method will be determined by the UPS communication capabilities.
Sincerely,
Kirk Jacko