Server down notification

Is there a way to get a notification when my Chanel’s DVR Server goes down, like with IFTTT or something? Is that the type of thing the HTTP API is all about? My raspberry pi server keeps going down and until I get it more stable I’d like to plug it into a smart plug which I can power cycle remotely when I get a notice that my server is unavailable. I have no experience with IFTTT but if you point me in the right direction maybe I can figure it out.

"Server going down" could mean a lot of things to a lot of people. Program crashes, program hangs, machine crashes, network goes down, power loss...

The only way to really know if the server is currently operable would be to have a program on another machine and another network constantly running and checking if the server would respond. This is not that hard to do if you have facilities. If you were on the same network, but another machine, you could issue:
curl -XGET "http:/192.168.0.232:8089/settings" (substitute your IP)
and see if you get a reasonable response.

1 Like

This one is even better:
curl -XGET "http:/192.168.0.232:8089/status"

1 Like

What I was thinking was set up a rule on ifttt to ping the server automatically and text me if it is unreachable. If I want to check manually I can open the app and check. But can it be automatic from a remote machine?

or just stop it from going down. The rpi uses very little power. Plug it into a battery.

image

Do you mean plug it into a battery instead of the wall? Mine is unavailable sometimes after being up for only an hour. The only thing I can do is unplug it and plug it back in. Sometimes I have to do that twice to get it back online. I’m missing a lot of recordings so I thought it would be nice to know when it goes down and do a power cycle remotely.

I have a powerstrips that do that they ping the units plugged into then if no response after so many pings it cycles that outlet. They were pretty expensive but a most have maybe you can find something cheaper along those line. I have my HdhomeRun units and servers on them. A simple smart outlet will do if you can send an alert to your phone that the server is down.

Yes, I mean get a cheap UPS and plug it into that. I think it is possible that some kind of power blip/instability is taking down your pi.

I have an rpi4. I don't actually use it for Channels, but I do run various other important network services on it (which are never offline).

Huh. Interesting. Thanks. In my case the pi is still powered on but the server is unavailable. Would that trigger a power cycle on your strip?

It is not a Power Strip meant for just 1 item but a at least 8 network attached devices and 2 always on devices ... it is meant for power users. It does do Curl and SSH. Has saved my butt many times when tuners or devices abruptly drop off the network.... or a process stops responding.

All my stuff is down in the basement to keep it cool and I hate going down there.

https://www.digital-loggers.com/curl.html

New! Pro Switch – Digital Loggers Direct (dlidirect.com)

Thanks for the help guys.

Just wanted to mention a simple ping test probably isn’t going to achieve what you want. You’ll want to use a curl command such as suggested above to verify the Channels software itself is responsive.

Ok thanks.