Looking for simple power supply quality logger

My internet router, switch etc, rebooted this morning. They’re on a UPS so this never should have happened.
I’m wondering if I can get a cheap plug-in device which would log eg supply voltage (and survive a brief power outage) so that I can see what’s going on should it happen again?
I tried turning the supply off to the UPS and it engaged correctly so I am a bit at a loss