I am starting to use nagios to monitor some of our systems, and i was wondering if anyone had ever come across a way to make it monitor directories for files.
I want to look in a directory and say there are x number of files in there that are over x mins old, so warn me.
Cheers
i found a plugin for this (can't remember where), which seems to work well in production.
and
it goes warning if the directory contains one or more files, critical if two or more. the plugin uses
find
, so modifying it with a-mtime xxx
to check only for files over a certain age would be trivial.the plugin itself is: