Go to ANY motorcycle shop and buy a battery tender and connect them up to your individual 12 volt batteries (remove all interconnects from the battery packs).
The Battery Tender will tell you when it's charging, or when it switches to "trickle" (green light comes on, or blinks green).
If it remains on CHARGE (red light, or on some types a yellow light) after 8 hours connection, the battery is bad.
Generally, on a multiple battery pack in a UPS, it only takes one battery to go south to have the whole bunch report as bad.
When you pull the pack out and connect the Battery Tender, lots of times it will charge for a very short while (often minutes, if not seconds) before the green light comes on. If that happens, good battery. Go to the next one in the pack and do the same.
Remember: Only test one battery at a time.
Remove all connections from the battery terminals before connecting the alligator clips from the Battery Tender.