Check if feed is updated every x minutes

I have searched the forum, but didnt find anything about this issue.

How can i check if a feed is updated every 10 minutes, or send a mail if a feed is not updated for e.g 2 hours?

 

Paul Reed's picture

Re: Check if feed is updated every x minutes

Are you self hosted, or use emoncms.org??

Paul

kenci's picture

Re: Check if feed is updated every x minutes

I am self hosted. Emoncms 8.3.5

Paul Reed's picture

Re: Check if feed is updated every x minutes

Ok, 2 options;

Install the notify module

Install the event module

Either can be configured to send you an alert if a feed is not updated, however, the notify module was written for that very purpose.

Paul

kenci's picture

Re: Check if feed is updated every x minutes

Thank you Paul! The Event Module is just what i need.

But i have one problem with this. I set the event to "IF temp is inactive send email to ..."

My temp is updated every 10 minutes, but i get emails every minute that the feed is inactive. How can i setup the "inactive time" of a feed? So, for me it would be inactive if the feed is not updated for 15 minutes.

EDIT:

Ok, looked at the github code of the module i saw this:

case 3:
// inactive
// not sure this can be called as no feed updated
//if (((time()-$row['lasttime'])/3600)>24) {}
$feedData = $feed->get($row['eventfeed']);
//error_log("Feeddata: " .$feedData->time);
$t = time()- strtotime($feedData['time']);
//error_log("t: " .$t);
if ($t > $row['eventvalue']){
$sendAlert = 1;
}
break;

Does that mean i need to set the seconds in the value field?

JD's picture

Re: Check if feed is updated every x minutes

Yes.  A 2 hour delay would be 7200 seconds.  You could then set the "mute" for 1 hour so that you'd get an e-mail every hour that the feed is inactive.  Setting this field to "no mute" could fill up your inbox!

sroof's picture

Re: Check if feed is updated every x minutes

Paul (or others) - what if we are using emoncms.org?  Is there still a "Notify on inactive feeds" option as described here? http://openenergymonitor.blogspot.com/2013/08/notify-on-inactive-feeds.html

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.