This will depend wildly on what you are planning to put onto it
That said I have a 2 cyber power 825va (I think that’s the model, not sure). It’s like 450watts each iirc. I got them 2 for 1 for about $120 new. One has my server/nas, for which it’s grossly underpowered (maybe 7-10 minutes of runtime, at best), and one powers basically everything else critical in my rack (modem, switch, poe switch, etc) and powers that longer but still not as long (my primary switch is a business switch that was pulled from an ewaste place for nothing, like $15, but it’s got 48 gigabit ports and 5 10gb ports! But it also uses a shocking amount of power).
They work great for my use case. I live in a rural area with a horrendous power grid so I lose power about once every 6 weeks. As a result I have a (very pricey, can’t recommend unless you lose power a lot like me) whole house generator with automatic transfer switch. When power drops out the generator kicks on and switches the house over to generator power which takes about 45-90 seconds, so I really only need these to keep my gear on for that period. Beyond that it’s generator monitoring and if the fuel supply for that is running low network gear is shutdown to conserve power
In a perfect world where I was financially independent I would probably upgrade the server one to at least a 1500va to ensure my storage pool could fully stop and everything could shut down even if power was lost
But most ups will work with monitoring in one way or another. APC and cyberpower work with the apc daemon (probably others) which can easily be implemented into all kinds of software and has support in mac, Linux, windows
Determining battery life depends greatly on load. Rough calculation with power supplies of gear connected, better calculation with something like a kill-a-watt or multimeter and taking a reading for a little while under load, add it all together and add 20-30% to be safe. APC, cyberpower, etc have calculators for this
Buying used can be okay but you do have to be comfortable changing the battery. Additionally there is the risk of something being wrong with it of course, they’re not bulletproof. They’re usually pretty decent though, the bigger thing is that they’re just really expensive to ship, even without batteries