What is the best approach to setting up a script to monitor and report a server's connection to the Internet? I'm not referring to connection to the local network, but rather a server's (or the whole network's) ability to access the Internet, for the cases when your ISP's connection goes down.
It would need to be a script that tests for an Internet connection 24/7 and logs the results (or possibly just logs when there is an outage), and then some other way to read these logs and generate a report, showing various stats (what % of the time was the ISP connection offline, etc).
Would this just be something as simple as pinging various popular URLs (google.com, amazon.com, etc), and using that as a test to determine if you have internet access? Or is there a better approach?
The purpose of this is mostly to log all the time our ISP is failing us, so we can show them and they can use it to fix the problem or to use the logs as leverage for my boss to use to switch ISPs.