Hi, Correct, there isn't a single STAF service request that would allow you to accomplish this, but you could use a combination of service requests.
For example, you could write a program (Java/Python/Perl/Tcl, etc.) or a STAX job that would periodically check the file for the particular message. You could use the STAF FSExt service's FILECONTAINS request to grep the log file for the particular message. When the program or STAX job determines that the particular message is contained in the log, then it could use the STAF PROCESS service's START request to start the fix_foo.sh script. Or, if the program that is writing the particular message to the log file could be updated, you could update it to generate an Event, and you could configure the EventManager service to be notified about that Event, and it could submit the PROCESS START request to start the script. So, there are several different ways you could do this. If you still have questions maybe you could provide some more details about the test environment. Thanks, David David Bender STAF/STAX Development IBM Software Group, WPLC 11501 Burnet Rd. Bldg. 903-5B002 Austin, TX 78758-3400 Phone (T/L): 1-512-286-5315 (363-5315) ITN: 23635315 Email: bda...@us.ibm.com From: Tennis Smith <ten...@tripit.com> To: staf-users@lists.sourceforge.net Date: 01/06/2010 10:46 AM Subject: [staf-users] File Monitoring to Drive Events? Hi, I have the need to execute commands (some remote, some not) that are triggered by a particular message in a log file. For example, I need to monitor (i.e. tail) foo.log and whenever the message "bar: problem found" occurs, immediately drive the script "fix_foo.sh". Does staf offer any facilities to help do this? I've looked briefly at FSExt and EventManager, but they don't seem appropriate for this. Correct? -- Tks, -T ------------------------------------------------------------------------------ This SF.Net email is sponsored by the Verizon Developer Community Take advantage of Verizon's best-in-class app development support A streamlined, 14 day to market process makes app distribution fast and easy Join now and get one step closer to millions of Verizon customers http://p.sf.net/sfu/verizon-dev2dev _______________________________________________ staf-users mailing list staf-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/staf-users
------------------------------------------------------------------------------ This SF.Net email is sponsored by the Verizon Developer Community Take advantage of Verizon's best-in-class app development support A streamlined, 14 day to market process makes app distribution fast and easy Join now and get one step closer to millions of Verizon customers http://p.sf.net/sfu/verizon-dev2dev
_______________________________________________ staf-users mailing list staf-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/staf-users