Monitor_grep
With this tag you can grep for any lines in the files that you
monitored for changes since the moment you created the monitor.
The expression for matching is just a normal regular expression
and all of the lines that match this expression will generate
an event as specified below.
Events
grep Event
file
The full path name and filename of the file that contains
the line that was matched.
line
The line number at which the match was found.
match
The line contents that matched the regular expression
defined above.
Required Attributes
id
The unique identifier for this monitor that is being
created.
expression
the regular expression to match each of the lines of the
monitored files against.
Usage Examples
Example #1
<sequence>
<monitor_create file="tests/ut/output/${logfile}.*" id="LOGS" />
<sleep time="3s" />
<monitor_grep expression="NEW.*" id="LOGS" />
<monitor_destroy id="LOGS" />
</sequence>