1.- 先将文件夹列表出来,生成文件

ls /chip/ica/CP/ >> /home/ubuntu/chip.txt

2.- 设定monit脚本,通过过文件滤内容实现监控,设置好已存在需要忽略监控的文件夹,同时加上需要监控的新建文件夹名规则实现监控,具体如下:

check file chip_New_Folder with path /home/ubuntu/chip.txt

       ignore content = "N30"

       ignore content = "X42"

       ignore content = "R94"

       if content = "^P" then alert