Server watchdog?

I’m running HASS on my homeserver and use Pushbullet for notifications, both of which depend on a) my homeserver being online and b) my internet connection being up and running. Somehow I would like to know if either one is down. I’ve got a Raspberry Pi offsite that I could use, it’s online 24/7 too.

What is the best way to do this? I know there are several commercial services for this, such as Uptime Robot, but I would like something simple that I can run on my own computers and get a notification if anything goes offline. I’m thinking about setting up a VPN or a SSH tunnel for pinging/NMAP or having a cron job write a time and date to a textfile every five minutes, a file that could then be rsynced to the other computer and processed. If the last update is more than say 15 minutes old, trigger a notification.

Ideally I would like to show my remote RPi as one of my devices in my HA dashboard.

Any suggestions?

I use Nmap (device tracker) & glances for all my system monitoring and it works well.

Are any of your devices offsite, ie not on the same router as the others? If so, how do you do it? SSH tunnel or VPN?

Edit: just found Glances’ website and the component.

I have one router connected to another router/gateway to create secondary network for most of my HA stuff. Everything is on-site.

Create script that send mqtt heartbeat message to remote pi.
You may also do nthis as cron task running every 5min(or whatever you want)

HA may do this with automations.

See here…

1 Like