pyinotify
pyinotify copied to clipboard
Option to monitor regular file creation and notify if it ceases
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
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