It sounds like your UPS might need a new battery. Three years is not an unreasonable lifetime for a UPS battery.

If your computer is experiencing loss of power *while the UPS is connected to the mains*, the unit might have developed a fault.