Brilliant! Nakarin, that works perfectly - exactly as is. I went with the following though because I care only if files exist or not - one more condition I added to the requirements is that the command to check if files are in the directory should not execute on any node other than a Weblogic application server.
bundle agent main { classes: “myAppTerror" and => { classmatch("WL10Host"), returnszero("/usr/bin/ls $(def.dir_myAppTerrDir) 2>&1 | /usr/bin/egrep ‘\w.*' > /dev/null", "useshell") }, comment => "Define a Weblogic 10 host that has time error files in the specified dir", handle => "main_classes_weblogic_time_errors"; reports: myAppTerror:: "Error: Time Errors Alert" action => immediate, comment => "email if time errors found", handle => "main_reports_time_errors"; } _______________________________________________ Help-cfengine mailing list Help-cfengine@cfengine.org https://cfengine.org/mailman/listinfo/help-cfengine