Normally I would use “filesize” alert and set the source (remote directory on server within network); source count: all; comparing: != -1; duration: once; within a few minutes of when the connection is scheduled to read. I have had success with this elsewhere, but what I am finding is that I can’t get it to work when there is another directory within the source directory. The file name also is not static (i.e., date appended to end of name), so I can’t set a specific filename in the source of the alert.
This location is typically where we have an archive directory that keeps a copy of the file just moved by the job. So, I will have this setup:
./[source]
./[source]/archive
The alert appears to be reading that something exists as I think it is hitting the child archive directory. Setting a specific name in the source won’t work because the file name is dynamic. I can’t seem to get any sort of wildcard matching in the source to work, either.
I have fiddled with having a TCL alert instead and passing the pattern as an arg, but am having little luck with following the documentation. If TCL alert is the path to take, I would like to setup a generic script that can pass some standardized args. Would I need to pass the directory as an arg as well? Any help would be great