Monitor and display status of internet connection

I already have the SpeedTest library working to test and display internet speeds in OpenHAB but now I am wondering how best to monitor and chart internet connectivity…

Would I be able to use something like a network binding and ping a well known public IP address to then track if my internet is down or up?

haven’t tried but I’m guessing why not?

That‘s what I do. Pinging