Need a "watchdog" box

We occasionally have Internet problems at our local town hall, where our TV station originates, and I need to be notified of it ASAP when that happens, day or night.

I am looking for a gadget that will monitor our Internet connection, and send out a text and/or email to me within a few minutes of something happening, like the loss of connection. Probably text or voice msg would be best, as an email might not go out if the Internet is down and there is only one route available.

It would be beneficial if this gadget would keep a log, too.

When I worked for the military, we called this a “watchdog,” as in watchdog timer, which would reset a system if it didn’t get a regular signal. Perhaps this is the wrong term here, as froogle searching for “watchdog” doesn’t turn up anything useful.

Any suggestions?

On first thought - You might be better off monitoring it in two directions - from outside and inside - i.e. set up a little box at either end and have them ping each other (or ping each others’ external IP address) - and each try to email you if they experience loss of connection with the other beyond a threshold period.

I’m fairly sure this can be done quite easily using a couple of Raspberry Pi computers and by cobbling together a bunch of other people’s scripts.

On second thought though, there are such things as cloud-based monitoring services - and some of them have a free version - for example: https://anturis.com/ - as long as there’s something on the vulnerable site that you can point that monitoring service at, it should be really straightforward.

Good ideas, Mangetout. It might be a good excuse for me to enter the world of Raspberry Pi, which I have been watching from the periphery. But since I’m not getting paid by the hour, right now, a turnkey gadget or something with minimum config hassle is what I’m hoping to find.

I’ll check the cloud services. We do have a video server that should be always on, and although I can’t alter the programming inside it, we could send a request for some data that we know should return a static response as long as everything is working. The cloud service would have to have a static IP so we pass it through the firewall; that could be a problem if they don’t offer such an option. That wouldn’t be a factor if we monitored things from inside the building.

If there’s no static IP, then a hybrid solution might work - a Raspberry Pi running the DynDNS client, installed inside the network you want to monitor (here’s an example) will give you a fixed DNS name you can point the cloud monitoring service at for ping monitoring or some such.

Actually, anything that can run a DynDNS client would do - an old PC, even some internet routers will do it.

You could get a computer with a land line telephone modem, then have a Microsoft shell script programmer write a program to ping something every so often. If successful after so may tries, then nothing happens.

If not successful, then the computer would call you via the phone modem. There are voice programs you can get to say something. Similar to what telemarketers use.

Also some home security systems have an “inactivity notification” setting (Ademco Honeywell). That is designed to be sure an elderly person is up and moving around each day - motion detectors sense movement in the house. If an entire morning goes by without any activity (elderly person fell and is stuck or whatever), then an alarm is sent to the alarm monitoring center. They would notify someone to come check on the elderly person.

I don’t know if that could check for activity just once a day? Or every so many minutes? Anyway you could get your computer ping tester to activate a relay output to the alarm box and the alarm box would use a regular land line phone or cell phone.

(If the internet is down, you wouldn’t want to be notified by the internet!)

Ah! I’ve got an even simpler idea.

Install a network camera - they include an inbuilt web server so you can check in on them from anywhere on the web - and they have inbuilt dynamic DNS updating so you get a fixed address to access them.

Then use any website uptime monitor (there are loads of free ones such as http://uptimerobot.com/) to alert you if the camera’s web page becomes inaccessible.

You could point the camera at a blank wall or test card if you don’t actually want any CCTV functionality.

Change the default security settings on the camera when you set it up - many of them are wide open out of the box.

That’s what I have right now, a Dropcam in the cable TV room. It reports thru the cloud, and the cloud server sends me an email if it doesn’t get a signal for about 10 minutes. AFAIK, this is not user-configurable.

Unfortunately it doesn’t tell me if the camera goes back online or if the connection is slow but present, so it’s an imperfect solution.

Oh, OK. is that monitoring provided by the camera’s vendor? Because you might be able to point a better (more responsive) external monitoring service at it.

I guess this might be another thing you have already explored: have you spoken to your ISP about uptime monitoring for the internet connection?

The Dropcam monitoring is a builtin function, and I doubt it can be altered by the customer. Once you buy the cam, it needs to report to their server to work at all, and essentially Dropcam is providing the service free. Of course they want you to subscribe to a video storage feature, but that is not required. So they are unlikely to offer many options for the free service.

I haven’t checked with our ISP (Charter) about this kind of monitoring, although that’s a good idea. Getting to talk to anyone in Charter is a massive exercise in frustration. First you have to get past the stupid computer, then…well you know the rest. I do have the cellphone number of the local head honcho for Charter, but I hate to bother him except in emergencies, and we have plenty of those.

Right now, I am trying to find out if the company that handles our highly sophisticated fire/burglary alarm system has an option we can use for Internet detection. If they do, this will make it easy to insert the cost into some other department’s budget instead of mine. Passing the buck is an art, not a science.

There are heap of software services. The Open source version is Nagios. You can install it on any monitoring machine, and it can be configured to send SMS alerts amongst other things. Best bet would probably be to rent a tiny server somewhere for a couple of dollars a month and install it there. Depends a great deal upon your precise needs and use case.

A more standard network camera (one with its own built in web server that is available for direct connection) would give you more flexibility on the external monitoring - as you could ping it every few seconds if necessary.

Adding a bit more.

A watchdog timer is what you describe it to be - it sits counting down the time, and if the time ever gets to zero, it restarts the thing it is watching. There is something built into the thing it is watching that resets the clock in the watchdog. So in ordinary operation the watchdog never reaches zero.

A watchdog doesn’t really monitor anything, and it doesn’t do any alerting. They are intentionally very simple. Most computers include one, and you can buy standalone single chip devices.

What is it that you would do to fix the problem at the town hall? Is it as simple as power cycling something? If so, you could build up a watchdog. A simple tiny computer (Pi or similar) pinging the network with a timeout. No network for more than x seconds, it restarts the modem. Or something like that.

As you note, if the internet is out, getting notifications to you is an issue. Which is why I suggested a remotely hosted Nagios instance. It pings your TV system from afar, and we asume it does not suffer any common failure modes with your TV system. As it should still have internet connectivity it can generate an SMS notification when it can no longer see your system. In principle you could build one up in a Pi as well, and just put it in a box anywhere you felt would be immune from common mode failures with your TV station. Paying to host it means you can feel secure that it will be in a secure facility with backup power and highly reliable internet.

I vaguely recall seeing some commercial offerings that provide pretty much the service you want as well. But right now the name eludes me.

A technical colleague suggested using [noparse] https://www.downnotifier.com/ [/noparse]. That site offers a free monitoring service, although I don’t see much description about how often it pings a URL or what else it might do. Since KISS is my watchword, I am going to try this for a while and see how it works. I’m also going to test it by downing our router sometime and checking how long it takes for the notification.

Sounds like you may have a solution but if you have any SQL operations running this code will perform a url monitoring function and send a email if the url fails.

It’s from a SQL site called SQLServerCentral.
You may need to register (free) to see the code.

Link

PM sent regarding an application I have written that does this.