Monitor Internet Online or Offline

Is there a way the hub can monitor if there is an internet connection or not?

It's rare, but my router needed to be rebooted the other morning, and I'd like to write a rule that if the hub doesn't have an internet connection, it will cycle the outlet for the router.

TIA!

I think @bptworld has an app that can ping a website.

There are a couple of apps/devices that allow ping, that can be used but RM also has a built in ping...