Hello,

one check statement per directory is necessary. You can use the custom "check 
program" script to trigger the event in the case that some directory has 
changed.

You can find more details about the custom checks scripts in the monit manual:
http://www.mmonit.com/monit/documentation/monit.html#program_status_testing

Regards,
Martin




On Oct 19, 2012, at 11:46 PM, Kimo Rosenbaum <[email protected]> wrote:

> Hello,
> 
> Is there a way to monitor the timestamps on multiple directories and if any of
> them changes run an exec script?
> 
> For example, our apache config is spread across several directories. If a file
> in any of the directories changes I would like apache to be reloaded. It is
> very likely that changes will be made to several files in several directories
> at once. I could do this but it seems like monit would try to reload twice (at
> the same time):
> 
> check directory vhosts path /path/to/vhosts
>   if changed timestamp then exec "apache reload"
> 
> check directory modules path /path/to/modules
>   if changed timestamp then exec "apache reload"
> 
> Thanks
> Kimo
> 
> 
> --
> To unsubscribe:
> https://lists.nongnu.org/mailman/listinfo/monit-general


--
To unsubscribe:
https://lists.nongnu.org/mailman/listinfo/monit-general

Reply via email to