pyinotify icon indicating copy to clipboard operation
pyinotify copied to clipboard

Option to monitor regular file creation and notify if it ceases

Open motioncircus opened this issue 6 years ago • 1 comments

I have a remote, raspberry Pi controlled (Rasbian Stretch OS), time-lapse camera rig which uploads a file at regular intervals.. currently one every 60 seconds between 7:30 am and 4:30 pm Mon - Fri.

Sometimes the camera will randomly crash so I need an automatic alert within a few minutes of it stopping. Is this something that can be achieved with pynotify, or could you suggest another method?

Thanks in advance Sdack

motioncircus avatar Mar 19 '18 04:03 motioncircus

Yep this could certainly achieve that. I'm not an expert but I'd tackle it as follows...Have a cron setup for the production hours you've mentioned. Then have a script to detect writes in the directory on time intervals of 1 minute, if it fails for more than 5-10 minutes then fire an email alert.

Cheers, Liam

liamptk avatar Mar 26 '18 11:03 liamptk