I have an nvr system that recording video surveillance into a file server (Debian). I made a Nagios plugin to check if the NVR system is recording correctly and send me a notification when it stops doing that. The issue is I'm using a find command:
find /srv/unifi-video/videos/ -name '*.ts' -mmin -10 | wc -l
and since it's checking through 400 Gb+ of files Nagios keeps timing out and sending "NRPE Socket timed out" messages.
Is it possible to make the find command to search only for the files created in the passed 10 minutes and not only the whole folder ?