Difference between revisions of "UM:Log Monitoring"

936 bytes removed ,  14:31, 2 April 2012
Line 352: Line 352:
=== <event> Tag ===
=== <event> Tag ===
Tag <nowiki><event></nowiki> defines event to be generated if current log record match to regular expression defined in <nowiki><match></nowiki> tag. Inside <nowiki><event></nowiki> tag you should specify event code to be generated (or event name if you configure server-side syslog parsing). If you wish to pass parts of log record text extracted with regular expression as event's parameters, you should specify correct number of parameters in '''params''' attribute.
Tag <nowiki><event></nowiki> defines event to be generated if current log record match to regular expression defined in <nowiki><match></nowiki> tag. Inside <nowiki><event></nowiki> tag you should specify event code to be generated (or event name if you configure server-side syslog parsing). If you wish to pass parts of log record text extracted with regular expression as event's parameters, you should specify correct number of parameters in '''params''' attribute.


=== <context> Tag ===
=== <context> Tag ===
<nowiki>Tag <context> defines activation or deactivation of contexts. It has the following format:</nowiki>
Tag <nowiki><context></nowiki> defines activation or deactivation of contexts. It has the following format:
 
 
<nowiki><context </nowiki>action="''action''" reset="''reset mode''">''context name''<nowiki></context></nowiki>


<syntaxhighlight lang="xml">
<context action="action" reset="reset mode">context name</context>
</syntaxhighlight>


Possible actions are:
Possible actions are:


 
{| class="wikitable"
{| style="border-spacing:0;"
|-
| style="border-top:0.0007in solid #000000;border-bottom:0.0007in solid #000000;border-left:0.0007in solid #000000;border-right:none;padding:0.0382in;"| set
! Action !! Description
| style="border:0.0007in solid #000000;padding:0.0382in;"| Activate (set "active" flag of) given context.
|-
 
| clear || Deactivate (clear "active" flag of) given context.
|-
|-
| style="border-top:none;border-bottom:0.0007in solid #000000;border-left:0.0007in solid #000000;border-right:none;padding:0.0382in;"| clear
| set || Activate (set "active" flag of) given context.
| style="border-top:none;border-bottom:0.0007in solid #000000;border-left:0.0007in solid #000000;border-right:0.0007in solid #000000;padding:0.0382in;"| Deactivate (clear "active" flag of) given context.
|}


|}
Reset mode determines how context will be deactivated (reset). Possible values for reset mode are:
Reset mode determines how context will be deactivated (reset). Possible values for reset mode are:


 
{| class="wikitable"
{| style="border-spacing:0;"
|-
| style="border-top:0.0007in solid #000000;border-bottom:0.0007in solid #000000;border-left:0.0007in solid #000000;border-right:none;padding:0.0382in;"| auto
! Reset mode !! Description
| style="border:0.0007in solid #000000;padding:0.0382in;"| Deactivate context automatically after first match in context (match rule with '''context''' attribute set to given context).
|-
 
| auto || Deactivate context automatically after first match in context (match rule with '''context''' attribute set to given context).
|-
|-
| style="border-top:none;border-bottom:0.0007in solid #000000;border-left:0.0007in solid #000000;border-right:none;padding:0.0382in;"| manual
| manual || Context can be deactivated only by explicit <nowiki><context action="clear"></nowiki> statement.
| style="border-top:none;border-bottom:0.0007in solid #000000;border-left:0.0007in solid #000000;border-right:0.0007in solid #000000;padding:0.0382in;"| <nowiki>Context can be deactivated only by explicit <context action="clear"> statement. </nowiki>
 
|}
|}
Both '''action''' and '''reset''' attributes can be omited; default value for '''action''' is '''set''', and default value for '''reset''' is '''auto'''.


Both '''action''' and '''reset''' attributes can be omitted; default value for '''action''' is '''set''', and default value for '''reset''' is '''auto'''.


== Examples of Parser Definition File ==
== Examples of Parser Definition File ==
683

edits