Monitor File Contents Step
This step monitors files for a token. The step completes successfully when the token appears, but fails if the token is not found within the specified time.
Required properties:
Property Name | Description |
---|---|
Files |
Specify a new-line separated list of paths to the files to monitor, relative to the current working directory. Pattern Matching Rules: * matches zero or more characters ? matches one character ** matches zero or more directories Examples:
|
Regular Expressions | Specify a new-line separated list of Java
regular expressions to match a line in the files to be monitored.
. Any character \d A digit: [0-9] \D A non-digit: [^0-9] \s A whitespace character: [\t\n\x0B\f\r] \S A non-whitespace character: [^\s] \w A word character: [a-zA-Z_0-9] \W A non-word character: [^\w] \\ The backslash character [abc] a, b, or c [^abc] Any character except a, b, or c (negation) [a-zA-Z] a through z or A through Z, inclusive (range) ^ The beginning of a line $ The end of a line X? X, once or not at all X* X, zero or more times X+ X, one or more times X{n} X, exactly n times X{n,} X, at least n times X{n,m} X, at least n but not more than m times Examples: a*b - matches b, aaaaab a+b - matches ab, aaaaab a.c - matches aac, aSc, a5c a.?c - matches ac, abc [A-Z]am - matches Jam, Sam \d{3}-\d{2}-\d{2} - matches 123-56-78 |
Timeout | Specify the time in seconds to wait for the regular expression match. The step fails If a match is not found in that time. |
Optional properties:
Property Name | Description |
---|---|
Directory Offset | A subdirectory of the current working directory where the step is to execute |
Monitor from Tail |
Select this to start monitoring from the ends of the files. One example use for this is when there is a growing log file and the token appears later in the file. |
Fail If Found | Check here for the step to fail if it meets the criteria set in the regular expression. In this case the step doesn't fail after the timeout expires. |