Remote feed status checking

I’ve had a couple of occasions where, usually after doing a system update, my emonpi has stopped processing inputs. I’ve only noticed after a few hours when I happen to login and spot it. At that point, I can see on either the input or feeds page that the age is highlighted in red and out-of-date.

I’m thinking that there must be a simple way to check for aged feeds, which I could set up to monitor externally. Is there a RESTful call I can use to see this, or perhaps something with MQTT? Or is it readily scriptable to push something out from the Pi? Sorry if it’s an obvious facility I’m missing, but I couldn’t find it either by searching or trawling through the docs. It seems unlikely that I’m the first person to want to do this :slight_smile:

Hello @nanoamp there really should be a built in facility to monitor this and while modules have been developed over the years they have not kept up to date with the core code and no longer work.

You could make calls to the /feed/list.json api and monitor the output of that for feeds that stop updating by looking at their last timestamps perhaps?

Yep, the API works out. I’ve written a small node.js app to run on another Pi. It checks the API and if any of the emonpi-tagged feeds exceed a specified age threshold, it fires off an email. If anyone else is interested, I could polish it up and stick it on github or something.

I imagine it’d be fairly straightforward to get it to do some other export action, such as publish using MQTT, or send to Telegram/IFTTT instead.