Recently I needed to monitor an internet connection and wanted to be notified when the connection was down and also back up.
A quick Google search allowed me to find UptimeRobot.
Uptimerobot is an online set of tools which allow you to monitor IPs, ports and also services like HTTP/HTTPS.
They offer a Free account which allows you to setup 50 monitors for which you can setup a frequency of between 5 mins and 24hrs.
Setting up a monitor is really simple. After creating an Account, login and in the My Settings page click on Add Alert Contacts.
This will allow you to specify the E-mail addresses you want the alerts to be sent to.
After you add the contacts, click on the Add New Monitor button. This will allow you to setup the type of monitor and other parameters like frequency and Contacts to Notify.
Once that is done you will have your monitor up and running. For websites, the monitor should work without issues as websites usually accept traffic from any IP. If you want to monitor a remote site or service were access is restricted to a specific set of IPs, you will need to allow access to the UptimeRobot service IPs.
The list of these IPs can be found from the UptimeRobot Locations Site. The list of IPv4 IPs is also available for download from here.
If you are using a Mikrotik router you can allow access by following the below procedure:
First we need to create an Address List, I named mine UptimeRobot. I used the below command to create it.
You may notice that the list is shorter than the one provided above as I have used subnets instead of single IPs where applicable.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
/ip firewall address-list add address=126.96.36.199/28 list=UptimeRobot add address=188.8.131.52 list=UptimeRobot add address=184.108.40.206/28 list=UptimeRobot add address=220.127.116.11 list=UptimeRobot add address=18.104.22.168 list=UptimeRobot add address=22.214.171.124 list=UptimeRobot add address=126.96.36.199 list=UptimeRobot add address=188.8.131.52 list=UptimeRobot add address=184.108.40.206 list=UptimeRobot add address=220.127.116.11 list=UptimeRobot add address=18.104.22.168 list=UptimeRobot add address=22.214.171.124 list=UptimeRobot add address=126.96.36.199 list=UptimeRobot add address=188.8.131.52 list=UptimeRobot add address=184.108.40.206 list=UptimeRobot add address=220.127.116.11 list=UptimeRobot add address=18.104.22.168 list=UptimeRobot add address=22.214.171.124 list=UptimeRobot add address=126.96.36.199 list=UptimeRobot add address=188.8.131.52 list=UptimeRobot add address=184.108.40.206 list=UptimeRobot add address=220.127.116.11 list=UptimeRobot add address=18.104.22.168 list=UptimeRobot
Now we need to accept ICMP packets from the newly created address list.
In the below example I will place the rule, which accepts the ICMP packets from the address list UptimeRobot, in the input chain. I placed it in position 4 so it will be the first rule just after the rule which drops invalid packets:
1 2 3
/ip firewall filter add chain=input action=accept prot ocol=icmp src-address-list=UptimeRobot place-before=4 comment="Accept ICMP Packets from UptimeRobot Servers"
Once that is done, your UptimeRobot dashboard will start showing that the link is up and monitoring will be available from then on.
The above code may be limited to the Mikrotik Routers/Firewalls but the concept is the same for other Firewalls too.
Hope you find this article useful.
Comments are welcome.
EDIT – Updated list of IP Addresses