+1 for this.

When I was having problems keeping my device online (result of a bum adapter), I wrote a perl script that would screen scrape the web interface of a PAP2T, which I cron'd to run every few minutes. It looked for "Online" or "Can't connect to server" at the right place, log the results to a file, do a tracert to the server it tried to connect to, log that, and email me with the information (including which line was down).

This capability would also provide VOIPo support a history of devices being online/offline (which they admitted they don't keep history of) and assist them in figuring out issues in the field.