Difference between revisions of "UM:Log Monitoring"

15 bytes added ,  23:07, 14 May 2012
m
Line 113: Line 113:


=== <match> Tag ===
=== <match> Tag ===
<nowiki>Tag <match> contains POSIX regular expression used to match log records. Parts enclosed in parenthesis can be extracted from log record and passed as arguments of generated event. You can use macros defined in <macros> section. Also, is is possible to define inverted match rules (rules when log </nowiki>record considered matching if it does not match regular expression). Inverted match can be set by setting attribute invert to 1.  
<nowiki>Tag <match> contains a POSIX regular expression that is used to match log records. Parts enclosed in parenthesis can be extracted from log record and passed as arguments of generated event. You can use macros defined in <macros> section. Also, it is possible to define inverted match rules (rules when log </nowiki>record considered matching if it does not match regular expression). Inverted match can be set by setting attribute invert to 1.  


Some examples:
Some examples:
Line 121: Line 121:
</syntaxhighlight>
</syntaxhighlight>


This regular expression will match any line started with word '''Error:''' , and everything after that word will be extracted from log record for use with event.
This regular expression will match any line starting with word '''Error:''', and everything after this word will be extracted from the log record for use with an event.




Line 129: Line 129:


This regular expression will match any line containing at least 3 consecutive digits.
This regular expression will match any line containing at least 3 consecutive digits.


<syntaxhighlight lang="xml">
<syntaxhighlight lang="xml">
Line 136: Line 135:


This regular expression will match any line not containing character sequence '''abc'''.
This regular expression will match any line not containing character sequence '''abc'''.


=== <id> Tag ===
=== <id> Tag ===
AutoPatrol
191

edits