How to watch Multiple Files with a single watcher jobs

Post Reply
User avatar
Razique
Nouveau
Nouveau
Posts: 23
Joined: 20 Nov 2009 12:00

How to watch Multiple Files with a single watcher jobs

Post by Razique » 20 Jul 2011 8:38

how do we configure a job to watch multiple files on a server , how it can be done with Rule.dat of ctmfw. Can anybody share the sample rule file to do so.

Any help highly appreciated.

Razique

User avatar
santoshmes
Nouveau
Nouveau
Posts: 1
Joined: 01 Jul 2011 12:00

Post by santoshmes » 22 Jul 2011 2:53

Why do you want to do it in one job? You can set up mutiple jobs with one OUT condition on it, so that once one has finished the next job will run.

Also you can watch with file mask but then youre files have to be in the same directory.

Something like

/dir/file1
/dir/file2
/dir/file3

with ctmfw job for /dir/file*

if one of those files will be there the job will pick it up.

User avatar
k2p6v5s
Nouveau
Nouveau
Posts: 27
Joined: 10 May 2010 12:00

How to watch Multiple Files with a single watcher jobs

Post by k2p6v5s » 26 Jul 2011 8:08

it can be achieved by suing the " ctmfw -input rule.dat "

please have look at the bmc documents of ctmfw and clearly mentioned with examples.

User avatar
yohcha
Nouveau
Nouveau
Posts: 3
Joined: 02 Jan 2012 12:00

Post by yohcha » 05 Jan 2012 12:00

Hello,

Here is an example. Define a Filewatcher job with the command to call : ctmfw -input FILE_WAIT_SATDB

and the content of file FILE_WAIT_SATDB :
#************************
#
# ON_FILEWATCH statements
ON_FILEWATCH /data/satdb/staging/AV/*.xpt CREATE
THEN
DO_EXIT 0
END_ON
ON_FILEWATCH /data/satdb/staging/AV/*.XPT CREATE
THEN
DO_EXIT 0
END_ON
ON_FILEWATCH /data/satdb/staging/AV/*.rtf CREATE
THEN
DO_EXIT 0
END_ON

Post Reply