Periodically UPS’s do a self test on the batteries. If the batteries are not OK due to end-of-life or bad celsl the UPS will indicate this to you via an alarm.
Modern UPS’s have an LCD display which enable you to see that an alarm is present and what the problem is.