web scrape uptime
Posted: Wed Feb 04, 2015 4:23 pm
I need to monitor the status of a VPN connection on a Draytek.
It has a web interface that shows the Uptime.
So what I want is scrape that web interface and monitor the uptime.
Step 1. with Web scraper. Done.
Step 2.
Let's say check is every 5 minutes.
So let's say first check uptime output is 0:05 (minutes) and next check outputs uptime is 0:10 (minutes) Then 1 (ok)
Imagine the VPN drops and reconnects so uptime is reset and the check returns 0:03 (minutes) Then 3 criticial!
Failsafe: Conection is lost, so no uptime. Then 3 critical!
How can I accomplish this?
It has a web interface that shows the Uptime.
So what I want is scrape that web interface and monitor the uptime.
Step 1. with Web scraper. Done.
Step 2.
Let's say check is every 5 minutes.
So let's say first check uptime output is 0:05 (minutes) and next check outputs uptime is 0:10 (minutes) Then 1 (ok)
Imagine the VPN drops and reconnects so uptime is reset and the check returns 0:03 (minutes) Then 3 criticial!
Failsafe: Conection is lost, so no uptime. Then 3 critical!
How can I accomplish this?