How can I remotely monitor whether a Mac is connected to the Internet?
I'd look at osquery for collecting that sort of data from a fleet of Macs. You might whip together something that's more narrow - but this will let you alert on disconnects as well as monitor / detect many other issues that will crop up on a daily basis.

You might be a candidate for using Apple Remote Desktop to create lists of hardware and it reaches out to each one and determines online status and can be automated for reporting. If your fleet is less than 2,500 devices, that might be just fine although it starts to become unwieldy or just need some time to complete tasks when you're handling more than a few hundred remote connections for anything but basic operations.