All modern UPSes have a low-battery alarm and run a periodic self-test; they will alert you when replacement is needed. Usually they both flash an indicator and make an alarm sound. If you have a monitoring daemon set up, they will alert it and you will probably get warning mail. If you ignore the alarm it will time out, but be repeated at intervals.